From 4feb61e005a5531bf103ece2cfa72babd160db5a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 12 Apr 2018 00:27:35 +0000 Subject: [PATCH 1/4] Generated from 4cffa20a5783aab5b2d2f0268d922c6b9a6a21ba Service Fabric REST API specification version 6.2 RTO --- lib/services/serviceFabric/LICENSE.txt | 42 +- lib/services/serviceFabric/README.md | 59 +- .../lib/models/aadMetadataObject.js | 3 +- ...crementalNamedPartitionScalingMechanism.js | 89 + .../lib/models/analysisEventMetadata.js | 60 + .../applicationBackupConfigurationInfo.js | 94 + .../lib/models/applicationBackupEntity.js | 70 + .../models/applicationCapacityDescription.js | 3 +- .../lib/models/applicationCreatedEvent.js | 113 + .../lib/models/applicationDeletedEvent.js | 105 + .../lib/models/applicationDescription.js | 25 +- .../lib/models/applicationEvent.js | 96 + .../lib/models/applicationHealth.js | 3 +- .../lib/models/applicationHealthEvaluation.js | 14 +- .../lib/models/applicationHealthPolicies.js | 4 +- .../lib/models/applicationHealthPolicy.js | 6 +- .../models/applicationHealthPolicyMapItem.js | 12 +- .../applicationHealthReportCreatedEvent.js | 161 + .../applicationHealthReportExpiredEvent.js | 161 + .../lib/models/applicationHealthState.js | 3 +- .../lib/models/applicationHealthStateChunk.js | 14 +- .../lib/models/applicationInfo.js | 37 +- .../lib/models/applicationLoadInfo.js | 11 +- .../lib/models/applicationNameInfo.js | 11 +- ...icationTypeApplicationsHealthEvaluation.js | 14 +- .../lib/models/applicationTypeInfo.js | 23 +- .../models/applicationUpgradeCompleteEvent.js | 114 + .../models/applicationUpgradeDescription.js | 79 +- .../applicationUpgradeDomainCompleteEvent.js | 139 + .../models/applicationUpgradeProgressInfo.js | 138 +- ...applicationUpgradeRollbackCompleteEvent.js | 122 + .../applicationUpgradeRollbackStartEvent.js | 131 + .../models/applicationUpgradeStartEvent.js | 138 + .../applicationUpgradeUpdateDescription.js | 71 +- .../models/applicationsHealthEvaluation.js | 10 +- .../averagePartitionLoadScalingTrigger.js | 102 + .../averageServiceLoadScalingTrigger.js | 102 + .../azureBlobBackupStorageDescription.js | 87 + .../lib/models/backupConfigurationInfo.js | 95 + .../serviceFabric/lib/models/backupEntity.js | 58 + .../serviceFabric/lib/models/backupInfo.js | 323 + .../lib/models/backupPartitionDescription.js | 64 + .../lib/models/backupPolicyDescription.js | 115 + .../lib/models/backupProgressInfo.js | 275 + .../lib/models/backupScheduleDescription.js | 58 + .../lib/models/backupStorageDescription.js | 66 + .../lib/models/backupSuspensionInfo.js | 65 + .../lib/models/binaryPropertyValue.js | 77 + .../serviceFabric/lib/models/chaos.js | 219 + .../serviceFabric/lib/models/chaosContext.js | 12 +- .../serviceFabric/lib/models/chaosEvent.js | 4 +- .../lib/models/chaosEventWrapper.js | 6 +- .../lib/models/chaosEventsSegment.js | 78 + .../chaosMovePrimaryFaultScheduledEvent.js | 129 + .../chaosMoveSecondaryFaultScheduledEvent.js | 137 + .../lib/models/chaosParameters.js | 86 +- .../models/chaosParametersDictionaryItem.js | 206 + .../chaosRemoveReplicaFaultCompletedEvent.js | 120 + .../chaosRemoveReplicaFaultScheduledEvent.js | 120 + ...osRestartCodePackageFaultCompletedEvent.js | 138 + ...osRestartCodePackageFaultScheduledEvent.js | 138 + .../chaosRestartNodeFaultCompletedEvent.js | 113 + .../chaosRestartNodeFaultScheduledEvent.js | 113 + .../chaosRestartReplicaFaultScheduledEvent.js | 120 + .../serviceFabric/lib/models/chaosSchedule.js | 102 + .../lib/models/chaosScheduleDescription.js | 75 + .../lib/models/chaosScheduleJob.js | 97 + .../chaosScheduleJobActiveDaysOfWeek.js | 114 + .../lib/models/chaosStartedEvent.js | 166 + .../lib/models/chaosStoppedEvent.js | 90 + .../lib/models/chaosTargetFilter.js | 121 + .../checkExistsPropertyBatchOperation.js | 85 + .../checkSequencePropertyBatchOperation.js | 85 + .../checkValuePropertyBatchOperation.js | 89 + .../clusterConfigurationUpgradeDescription.js | 1 - .../clusterConfigurationUpgradeStatusInfo.js | 5 +- .../serviceFabric/lib/models/clusterEvent.js | 82 + .../lib/models/clusterHealthChunk.js | 17 +- .../clusterHealthChunkQueryDescription.js | 34 +- .../lib/models/clusterHealthPolicies.js | 36 +- .../lib/models/clusterHealthPolicy.js | 24 +- .../models/clusterHealthReportCreatedEvent.js | 146 + .../models/clusterHealthReportExpiredEvent.js | 146 + .../lib/models/clusterUpgradeCompleteEvent.js | 99 + .../models/clusterUpgradeDescriptionObject.js | 110 +- .../clusterUpgradeDomainCompleteEvent.js | 115 + .../models/clusterUpgradeProgressObject.js | 169 +- .../clusterUpgradeRollbackCompleteEvent.js | 107 + .../clusterUpgradeRollbackStartEvent.js | 107 + .../lib/models/clusterUpgradeStartEvent.js | 122 + .../lib/models/codePackageEntryPoint.js | 15 +- .../lib/models/composeDeploymentStatusInfo.js | 11 +- .../composeDeploymentUpgradeDescription.js | 75 +- .../composeDeploymentUpgradeProgressInfo.js | 130 +- .../lib/models/containerApiRequestBody.js | 78 + .../lib/models/containerApiResponse.js | 61 + .../lib/models/containerApiResult.js | 77 + .../lib/models/containerDeactivatedEvent.js | 187 + .../lib/models/containerInstanceEvent.js | 82 + .../serviceFabric/lib/models/containerLogs.js | 52 + .../createComposeDeploymentDescription.js | 5 +- .../currentUpgradeDomainProgressInfo.js | 5 +- .../models/deactivationIntentDescription.js | 5 - .../models/deletePropertyBatchOperation.js | 72 + .../models/deltaNodesCheckHealthEvaluation.js | 11 +- .../deployServicePackageToNodeDescription.js | 14 +- .../lib/models/deployedApplicationHealth.js | 10 +- .../deployedApplicationHealthEvaluation.js | 17 +- ...oyedApplicationHealthReportCreatedEvent.js | 169 + ...oyedApplicationHealthReportExpiredEvent.js | 169 + .../models/deployedApplicationHealthState.js | 6 +- .../deployedApplicationHealthStateChunk.js | 5 +- .../lib/models/deployedApplicationInfo.js | 30 +- .../deployedApplicationsHealthEvaluation.js | 10 +- .../lib/models/deployedCodePackageInfo.js | 64 +- ...deployedServiceHealthReportCreatedEvent.js | 186 + ...deployedServiceHealthReportExpiredEvent.js | 186 + .../models/deployedServicePackageHealth.js | 8 +- .../deployedServicePackageHealthEvaluation.js | 17 +- .../deployedServicePackageHealthState.js | 16 +- .../deployedServicePackageHealthStateChunk.js | 9 +- ...deployedServicePackageHealthStateFilter.js | 4 +- .../lib/models/deployedServicePackageInfo.js | 16 +- ...deployedServicePackagesHealthEvaluation.js | 11 +- .../deployedServiceReplicaDetailInfo.js | 18 +- .../lib/models/deployedServiceReplicaInfo.js | 35 +- .../lib/models/deployedServiceTypeInfo.js | 21 +- ...eployedStatefulServiceReplicaDetailInfo.js | 80 +- .../deployedStatefulServiceReplicaInfo.js | 40 +- ...loyedStatelessServiceInstanceDetailInfo.js | 28 +- .../deployedStatelessServiceInstanceInfo.js | 13 +- .../lib/models/doublePropertyValue.js | 69 + .../lib/models/enableBackupDescription.js | 53 + .../models/ensureAvailabilitySafetyCheck.js | 6 + .../models/ensurePartitionQurumSafetyCheck.js | 6 + .../serviceFabric/lib/models/entityHealth.js | 14 +- .../lib/models/entityHealthState.js | 6 +- .../lib/models/entityHealthStateChunk.js | 5 +- .../lib/models/entityKindHealthStateCount.js | 8 +- .../lib/models/eventHealthEvaluation.js | 10 +- .../lib/models/executingFaultsChaosEvent.js | 9 +- ...toreProvisionApplicationTypeDescription.js | 101 + .../serviceFabric/lib/models/fabricError.js | 117 +- .../lib/models/fabricErrorError.js | 116 +- .../serviceFabric/lib/models/fabricEvent.js | 84 + .../lib/models/failedPropertyBatchInfo.js | 81 + .../failedUpgradeDomainProgressObject.js | 5 +- .../failureUpgradeDomainProgressInfo.js | 5 +- .../serviceFabric/lib/models/fileInfo.js | 10 +- .../fileShareBackupStorageDescription.js | 114 + .../serviceFabric/lib/models/fileVersion.js | 14 +- .../serviceFabric/lib/models/folderInfo.js | 11 +- ...frequencyBasedBackupScheduleDescription.js | 71 + .../getBackupByStorageQueryDescription.js | 116 + .../lib/models/getPropertyBatchOperation.js | 85 + .../lib/models/guidPropertyValue.js | 69 + .../lib/models/healthEvaluation.js | 7 +- .../lib/models/healthEvaluationWrapper.js | 10 +- .../lib/models/healthInformation.js | 9 +- .../lib/models/imageStoreContent.js | 5 +- .../serviceFabric/lib/models/index.d.ts | 7692 ++- .../serviceFabric/lib/models/index.js | 270 +- .../lib/models/int64PropertyValue.js | 69 + .../models/int64RangePartitionInformation.js | 6 + .../lib/models/invokeDataLossResult.js | 12 +- .../lib/models/invokeQuorumLossResult.js | 12 +- .../lib/models/keyValueStoreReplicaStatus.js | 6 + .../lib/models/monitoringPolicyDescription.js | 40 +- .../lib/models/nameDescription.js | 53 + .../lib/models/namedPartitionInformation.js | 6 + .../models/namedPartitionSchemeDescription.js | 6 + .../lib/models/nodeAbortedEvent.js | 153 + .../lib/models/nodeAbortingEvent.js | 153 + .../lib/models/nodeAddedEvent.js | 137 + .../lib/models/nodeCloseEvent.js | 113 + .../lib/models/nodeClosingEvent.js | 153 + .../lib/models/nodeDeactivateCompleteEvent.js | 121 + .../lib/models/nodeDeactivateStartEvent.js | 113 + .../lib/models/nodeDeactivationInfo.js | 15 +- .../lib/models/nodeDeactivationTask.js | 14 +- .../lib/models/nodeDeactivationTaskId.js | 5 +- .../serviceFabric/lib/models/nodeDownEvent.js | 105 + .../serviceFabric/lib/models/nodeEvent.js | 90 + .../serviceFabric/lib/models/nodeHealth.js | 3 +- .../lib/models/nodeHealthEvaluation.js | 12 +- .../models/nodeHealthReportCreatedEvent.js | 161 + .../models/nodeHealthReportExpiredEvent.js | 161 + .../lib/models/nodeHealthState.js | 5 +- .../lib/models/nodeHealthStateChunk.js | 2 +- .../serviceFabric/lib/models/nodeInfo.js | 44 +- .../serviceFabric/lib/models/nodeLoadInfo.js | 3 +- .../lib/models/nodeOpenFailedEvent.js | 161 + .../lib/models/nodeOpenedSuccessEvent.js | 153 + .../lib/models/nodeOpeningEvent.js | 153 + .../lib/models/nodeRemovedEvent.js | 137 + .../lib/models/nodeRepairImpactDescription.js | 6 + .../lib/models/nodeRepairTargetDescription.js | 6 + .../serviceFabric/lib/models/nodeResult.js | 2 +- .../lib/models/nodeTransitionProgress.js | 14 +- .../lib/models/nodeTransitionResult.js | 5 +- .../serviceFabric/lib/models/nodeUpEvent.js | 105 + .../lib/models/nodeUpgradeProgressInfo.js | 9 +- .../lib/models/nodesHealthEvaluation.js | 10 +- .../lib/models/operationStatus.js | 14 +- .../lib/models/packageSharingPolicyInfo.js | 6 +- .../lib/models/pagedApplicationInfoList.js | 9 +- .../models/pagedApplicationTypeInfoList.js | 9 +- .../pagedBackupConfigurationInfoList.js | 83 + .../lib/models/pagedBackupEntityList.js | 83 + .../lib/models/pagedBackupInfoList.js | 77 + .../pagedBackupPolicyDescriptionList.js | 78 + .../pagedComposeDeploymentStatusInfoList.js | 9 +- .../pagedDeployedApplicationInfoList.js | 80 + .../lib/models/pagedNodeInfoList.js | 9 +- .../lib/models/pagedPropertyInfoList.js | 88 + .../lib/models/pagedReplicaInfoList.js | 9 +- .../lib/models/pagedServiceInfoList.js | 9 +- .../models/pagedServicePartitionInfoList.js | 9 +- .../lib/models/pagedSubNameInfoList.js | 85 + .../lib/models/partitionAnalysisEvent.js | 100 + .../partitionBackupConfigurationInfo.js | 105 + .../lib/models/partitionBackupEntity.js | 82 + .../lib/models/partitionDataLossProgress.js | 22 +- .../lib/models/partitionEvent.js | 94 + .../lib/models/partitionHealth.js | 3 +- .../lib/models/partitionHealthEvaluation.js | 14 +- .../partitionHealthReportCreatedEvent.js | 153 + .../partitionHealthReportExpiredEvent.js | 153 + .../lib/models/partitionHealthState.js | 3 +- .../lib/models/partitionHealthStateChunk.js | 8 +- .../lib/models/partitionHealthStateFilter.js | 4 +- .../lib/models/partitionInformation.js | 7 +- .../partitionInstanceCountScaleMechanism.js | 89 + .../lib/models/partitionLoadInformation.js | 2 +- .../partitionPrimaryMoveAnalysisEvent.js | 137 + .../lib/models/partitionQuorumLossProgress.js | 20 +- .../partitionReconfigurationCompletedEvent.js | 193 + .../lib/models/partitionRestartProgress.js | 20 +- .../lib/models/partitionSafetyCheck.js | 9 +- .../lib/models/partitionSchemeDescription.js | 1 + .../lib/models/partitionsHealthEvaluation.js | 10 +- .../lib/models/primaryReplicatorStatus.js | 16 +- .../lib/models/processDeactivatedEvent.js | 187 + .../models/propertyBatchDescriptionList.js | 69 + .../lib/models/propertyBatchInfo.js | 58 + .../lib/models/propertyBatchOperation.js | 67 + .../lib/models/propertyDescription.js | 78 + .../serviceFabric/lib/models/propertyInfo.js | 93 + .../lib/models/propertyMetadata.js | 99 + .../serviceFabric/lib/models/propertyValue.js | 58 + .../provisionApplicationTypeDescription.js | 90 + ...provisionApplicationTypeDescriptionBase.js | 72 + .../lib/models/putPropertyBatchOperation.js | 95 + .../lib/models/reconfigurationInformation.js | 18 +- .../remoteReplicatorAcknowledgementStatus.js | 7 +- .../lib/models/remoteReplicatorStatus.js | 10 +- .../lib/models/repairImpactDescriptionBase.js | 1 + .../lib/models/repairTargetDescriptionBase.js | 1 + .../serviceFabric/lib/models/repairTask.js | 72 +- .../models/repairTaskApproveDescription.js | 2 +- .../lib/models/repairTaskCancelDescription.js | 4 +- .../serviceFabric/lib/models/replicaEvent.js | 108 + .../serviceFabric/lib/models/replicaHealth.js | 4 +- .../lib/models/replicaHealthEvaluation.js | 24 +- .../lib/models/replicaHealthState.js | 4 +- .../lib/models/replicaHealthStateChunk.js | 11 +- .../lib/models/replicaHealthStateFilter.js | 6 +- .../serviceFabric/lib/models/replicaInfo.js | 13 +- .../lib/models/replicaStatusBase.js | 1 + .../lib/models/replicasHealthEvaluation.js | 10 +- .../lib/models/replicatorStatus.js | 1 + .../lib/models/resolvedServiceEndpoint.js | 3 +- .../lib/models/resolvedServicePartition.js | 15 +- .../restartDeployedCodePackageDescription.js | 26 +- .../lib/models/restartNodeDescription.js | 6 +- .../lib/models/restartPartitionResult.js | 12 +- .../lib/models/restorePartitionDescription.js | 82 + .../lib/models/restoreProgressInfo.js | 256 + .../models/rollingUpgradeUpdateDescription.js | 59 +- .../serviceFabric/lib/models/safetyCheck.js | 1 + .../lib/models/safetyCheckWrapper.js | 4 +- .../lib/models/scalingMechanismDescription.js | 58 + .../lib/models/scalingPolicyDescription.js | 78 + .../lib/models/scalingTriggerDescription.js | 58 + .../models/secondaryActiveReplicatorStatus.js | 6 + .../models/secondaryIdleReplicatorStatus.js | 6 + .../lib/models/secondaryReplicatorStatus.js | 16 +- .../lib/models/seedNodeSafetyCheck.js | 6 + .../lib/models/selectedPartition.js | 9 +- .../models/serviceBackupConfigurationInfo.js | 94 + .../lib/models/serviceBackupEntity.js | 70 + .../models/serviceCorrelationDescription.js | 7 +- .../lib/models/serviceCreatedEvent.js | 173 + .../lib/models/serviceDeletedEvent.js | 161 + .../lib/models/serviceDescription.js | 46 +- .../serviceFabric/lib/models/serviceEvent.js | 96 + .../models/serviceFromTemplateDescription.js | 15 +- .../serviceFabric/lib/models/serviceHealth.js | 3 +- .../lib/models/serviceHealthEvaluation.js | 14 +- .../models/serviceHealthReportCreatedEvent.js | 161 + .../models/serviceHealthReportExpiredEvent.js | 161 + .../lib/models/serviceHealthState.js | 3 +- .../lib/models/serviceHealthStateChunk.js | 7 +- .../lib/models/serviceHealthStateFilter.js | 2 +- .../serviceFabric/lib/models/serviceInfo.js | 25 +- .../models/serviceLoadMetricDescription.js | 5 +- .../lib/models/serviceNameInfo.js | 11 +- .../lib/models/servicePartitionInfo.js | 20 +- ...PlacementInvalidDomainPolicyDescription.js | 6 + ...nPartiallyPlaceServicePolicyDescription.js | 6 + .../servicePlacementPolicyDescription.js | 1 + ...entPreferPrimaryDomainPolicyDescription.js | 10 +- ...uireDomainDistributionPolicyDescription.js | 8 +- ...lacementRequiredDomainPolicyDescription.js | 8 +- .../lib/models/serviceTypeDescription.js | 12 +- .../models/serviceTypeHealthPolicyMapItem.js | 3 +- .../lib/models/serviceTypeInfo.js | 16 +- .../lib/models/serviceUpdateDescription.js | 29 +- .../lib/models/servicesHealthEvaluation.js | 10 +- .../models/singletonPartitionInformation.js | 12 +- .../singletonPartitionSchemeDescription.js | 6 + .../models/startClusterUpgradeDescription.js | 96 +- .../lib/models/startedChaosEvent.js | 89 +- ...statefulReplicaHealthReportCreatedEvent.js | 168 + ...statefulReplicaHealthReportExpiredEvent.js | 168 + .../lib/models/statefulServiceDescription.js | 21 + .../lib/models/statefulServiceInfo.js | 6 + .../models/statefulServicePartitionInfo.js | 12 +- .../models/statefulServiceReplicaHealth.js | 14 +- .../statefulServiceReplicaHealthState.js | 16 +- .../lib/models/statefulServiceReplicaInfo.js | 19 +- .../models/statefulServiceTypeDescription.js | 6 + .../statefulServiceUpdateDescription.js | 21 + ...tatelessReplicaHealthReportCreatedEvent.js | 160 + ...tatelessReplicaHealthReportExpiredEvent.js | 160 + .../lib/models/statelessServiceDescription.js | 21 + .../lib/models/statelessServiceInfo.js | 6 + .../models/statelessServiceInstanceHealth.js | 15 +- .../statelessServiceInstanceHealthState.js | 11 +- .../models/statelessServiceInstanceInfo.js | 13 +- .../models/statelessServicePartitionInfo.js | 6 + .../models/statelessServiceTypeDescription.js | 6 + .../statelessServiceUpdateDescription.js | 21 + .../lib/models/stoppedChaosEvent.js | 10 +- .../lib/models/stringPropertyValue.js | 69 + .../lib/models/successfulPropertyBatchInfo.js | 82 + .../systemApplicationHealthEvaluation.js | 12 +- .../lib/models/testErrorChaosEvent.js | 15 +- .../timeBasedBackupScheduleDescription.js | 105 + .../serviceFabric/lib/models/timeOfDay.js | 70 + .../serviceFabric/lib/models/timeRange.js | 74 + ...ormInt64RangePartitionSchemeDescription.js | 6 + ...provisionApplicationTypeDescriptionInfo.js | 67 + .../models/updateClusterUpgradeDescription.js | 98 +- ...deDomainDeltaNodesCheckHealthEvaluation.js | 10 +- .../lib/models/upgradeDomainInfo.js | 6 +- .../upgradeDomainNodesHealthEvaluation.js | 10 +- .../upgradeOrchestrationServiceState.js | 53 + ...upgradeOrchestrationServiceStateSummary.js | 89 + .../lib/models/uploadChunkRange.js | 62 + .../serviceFabric/lib/models/uploadSession.js | 65 + .../lib/models/uploadSessionInfo.js | 99 + .../lib/models/validationFailedChaosEvent.js | 11 +- .../waitForInbuildReplicaSafetyCheck.js | 10 +- .../waitForPrimaryPlacementSafetyCheck.js | 6 + .../models/waitForPrimarySwapSafetyCheck.js | 6 + .../waitForReconfigurationSafetyCheck.js | 6 + .../lib/models/waitingChaosEvent.js | 9 +- .../lib/serviceFabricClient.d.ts | 12651 +++- .../serviceFabric/lib/serviceFabricClient.js | 48375 +++++++++++----- lib/services/serviceFabric/package.json | 30 +- 371 files changed, 71844 insertions(+), 17889 deletions(-) create mode 100644 lib/services/serviceFabric/lib/models/addRemoveIncrementalNamedPartitionScalingMechanism.js create mode 100644 lib/services/serviceFabric/lib/models/analysisEventMetadata.js create mode 100644 lib/services/serviceFabric/lib/models/applicationBackupConfigurationInfo.js create mode 100644 lib/services/serviceFabric/lib/models/applicationBackupEntity.js create mode 100644 lib/services/serviceFabric/lib/models/applicationCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationDeletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartEvent.js create mode 100644 lib/services/serviceFabric/lib/models/applicationUpgradeStartEvent.js create mode 100644 lib/services/serviceFabric/lib/models/averagePartitionLoadScalingTrigger.js create mode 100644 lib/services/serviceFabric/lib/models/averageServiceLoadScalingTrigger.js create mode 100644 lib/services/serviceFabric/lib/models/azureBlobBackupStorageDescription.js create mode 100644 lib/services/serviceFabric/lib/models/backupConfigurationInfo.js create mode 100644 lib/services/serviceFabric/lib/models/backupEntity.js create mode 100644 lib/services/serviceFabric/lib/models/backupInfo.js create mode 100644 lib/services/serviceFabric/lib/models/backupPartitionDescription.js create mode 100644 lib/services/serviceFabric/lib/models/backupPolicyDescription.js create mode 100644 lib/services/serviceFabric/lib/models/backupProgressInfo.js create mode 100644 lib/services/serviceFabric/lib/models/backupScheduleDescription.js create mode 100644 lib/services/serviceFabric/lib/models/backupStorageDescription.js create mode 100644 lib/services/serviceFabric/lib/models/backupSuspensionInfo.js create mode 100644 lib/services/serviceFabric/lib/models/binaryPropertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/chaos.js create mode 100644 lib/services/serviceFabric/lib/models/chaosEventsSegment.js create mode 100644 lib/services/serviceFabric/lib/models/chaosMovePrimaryFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosMoveSecondaryFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRestartNodeFaultCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRestartNodeFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosSchedule.js create mode 100644 lib/services/serviceFabric/lib/models/chaosScheduleDescription.js create mode 100644 lib/services/serviceFabric/lib/models/chaosScheduleJob.js create mode 100644 lib/services/serviceFabric/lib/models/chaosScheduleJobActiveDaysOfWeek.js create mode 100644 lib/services/serviceFabric/lib/models/chaosStartedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosStoppedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/chaosTargetFilter.js create mode 100644 lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/clusterEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartEvent.js create mode 100644 lib/services/serviceFabric/lib/models/clusterUpgradeStartEvent.js create mode 100644 lib/services/serviceFabric/lib/models/containerApiRequestBody.js create mode 100644 lib/services/serviceFabric/lib/models/containerApiResponse.js create mode 100644 lib/services/serviceFabric/lib/models/containerApiResult.js create mode 100644 lib/services/serviceFabric/lib/models/containerDeactivatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/containerInstanceEvent.js create mode 100644 lib/services/serviceFabric/lib/models/containerLogs.js create mode 100644 lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/deployedApplicationHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/deployedServiceHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/deployedServiceHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/doublePropertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/enableBackupDescription.js create mode 100644 lib/services/serviceFabric/lib/models/externalStoreProvisionApplicationTypeDescription.js create mode 100644 lib/services/serviceFabric/lib/models/fabricEvent.js create mode 100644 lib/services/serviceFabric/lib/models/failedPropertyBatchInfo.js create mode 100644 lib/services/serviceFabric/lib/models/fileShareBackupStorageDescription.js create mode 100644 lib/services/serviceFabric/lib/models/frequencyBasedBackupScheduleDescription.js create mode 100644 lib/services/serviceFabric/lib/models/getBackupByStorageQueryDescription.js create mode 100644 lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/guidPropertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/int64PropertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/nameDescription.js create mode 100644 lib/services/serviceFabric/lib/models/nodeAbortedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeAbortingEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeAddedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeCloseEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeClosingEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeDeactivateCompleteEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeDeactivateStartEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeDownEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeOpenedSuccessEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeOpeningEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeRemovedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/nodeUpEvent.js create mode 100644 lib/services/serviceFabric/lib/models/pagedBackupConfigurationInfoList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedBackupEntityList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedBackupInfoList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedBackupPolicyDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedPropertyInfoList.js create mode 100644 lib/services/serviceFabric/lib/models/pagedSubNameInfoList.js create mode 100644 lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js create mode 100644 lib/services/serviceFabric/lib/models/partitionBackupEntity.js create mode 100644 lib/services/serviceFabric/lib/models/partitionEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionInstanceCountScaleMechanism.js create mode 100644 lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js create mode 100644 lib/services/serviceFabric/lib/models/partitionReconfigurationCompletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/processDeactivatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/propertyBatchDescriptionList.js create mode 100644 lib/services/serviceFabric/lib/models/propertyBatchInfo.js create mode 100644 lib/services/serviceFabric/lib/models/propertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/propertyDescription.js create mode 100644 lib/services/serviceFabric/lib/models/propertyInfo.js create mode 100644 lib/services/serviceFabric/lib/models/propertyMetadata.js create mode 100644 lib/services/serviceFabric/lib/models/propertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/provisionApplicationTypeDescription.js create mode 100644 lib/services/serviceFabric/lib/models/provisionApplicationTypeDescriptionBase.js create mode 100644 lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js create mode 100644 lib/services/serviceFabric/lib/models/replicaEvent.js create mode 100644 lib/services/serviceFabric/lib/models/restorePartitionDescription.js create mode 100644 lib/services/serviceFabric/lib/models/restoreProgressInfo.js create mode 100644 lib/services/serviceFabric/lib/models/scalingMechanismDescription.js create mode 100644 lib/services/serviceFabric/lib/models/scalingPolicyDescription.js create mode 100644 lib/services/serviceFabric/lib/models/scalingTriggerDescription.js create mode 100644 lib/services/serviceFabric/lib/models/serviceBackupConfigurationInfo.js create mode 100644 lib/services/serviceFabric/lib/models/serviceBackupEntity.js create mode 100644 lib/services/serviceFabric/lib/models/serviceCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/serviceDeletedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/serviceEvent.js create mode 100644 lib/services/serviceFabric/lib/models/serviceHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js create mode 100644 lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js create mode 100644 lib/services/serviceFabric/lib/models/stringPropertyValue.js create mode 100644 lib/services/serviceFabric/lib/models/successfulPropertyBatchInfo.js create mode 100644 lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js create mode 100644 lib/services/serviceFabric/lib/models/timeOfDay.js create mode 100644 lib/services/serviceFabric/lib/models/timeRange.js create mode 100644 lib/services/serviceFabric/lib/models/unprovisionApplicationTypeDescriptionInfo.js create mode 100644 lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceState.js create mode 100644 lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceStateSummary.js create mode 100644 lib/services/serviceFabric/lib/models/uploadChunkRange.js create mode 100644 lib/services/serviceFabric/lib/models/uploadSession.js create mode 100644 lib/services/serviceFabric/lib/models/uploadSessionInfo.js diff --git a/lib/services/serviceFabric/LICENSE.txt b/lib/services/serviceFabric/LICENSE.txt index 0313a903d7..5431ba98b9 100644 --- a/lib/services/serviceFabric/LICENSE.txt +++ b/lib/services/serviceFabric/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft - -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. \ No newline at end of file +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +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. diff --git a/lib/services/serviceFabric/README.md b/lib/services/serviceFabric/README.md index 6645b5188a..917d95528f 100644 --- a/lib/services/serviceFabric/README.md +++ b/lib/services/serviceFabric/README.md @@ -1,18 +1,41 @@ -# Microsoft Azure SDK for Node.js - Service Fabric - -This project provides a Node.js package for accessing the Azure Service Fabric. Right now it supports: -- **Node.js version: 6.x.x or higher** - -## Features - - -## How to Install - -```bash -npm install azure-servicefabric -``` - -## Related projects - -- [Microsoft Azure SDK for Node.js](https://github.com/WindowsAzure/azure-sdk-for-node) - +--- +uid: azure-servicefabric +summary: *content + +--- +# Microsoft Azure SDK for Node.js - ServiceFabricClient +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +## Features + + +## How to Install + +```bash +npm install azure-servicefabric +``` + +## How to use + +### Authentication, client creation and getClusterManifest as an example. + +```javascript +const msRest = require("ms-rest"); +const ServiceFabricClient = require("azure-servicefabric"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new ServiceFabricClient(creds, subscriptionId); +const timeout = 1; +client.getClusterManifest(timeout).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +## Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/serviceFabric/lib/models/aadMetadataObject.js b/lib/services/serviceFabric/lib/models/aadMetadataObject.js index ba1953dac6..0ef02b8ca6 100644 --- a/lib/services/serviceFabric/lib/models/aadMetadataObject.js +++ b/lib/services/serviceFabric/lib/models/aadMetadataObject.js @@ -21,7 +21,8 @@ class AadMetadataObject { /** * Create a AadMetadataObject. * @member {string} [type] The client authentication method. - * @member {object} [metadata] + * @member {object} [metadata] Azure Active Directory metadata used for + * secured connection to cluster. * @member {string} [metadata.authority] The AAD authority url. * @member {string} [metadata.client] The AAD client application Id. * @member {string} [metadata.cluster] The AAD cluster application Id. diff --git a/lib/services/serviceFabric/lib/models/addRemoveIncrementalNamedPartitionScalingMechanism.js b/lib/services/serviceFabric/lib/models/addRemoveIncrementalNamedPartitionScalingMechanism.js new file mode 100644 index 0000000000..67dba30ed8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/addRemoveIncrementalNamedPartitionScalingMechanism.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents a scaling mechanism for adding or removing named partitions of a + * stateless service. Partition names are in the format '0','1''N-1' + * + * @extends models['ScalingMechanismDescription'] + */ +class AddRemoveIncrementalNamedPartitionScalingMechanism extends models['ScalingMechanismDescription'] { + /** + * Create a AddRemoveIncrementalNamedPartitionScalingMechanism. + * @member {number} minPartitionCount Minimum number of named partitions of + * the service. + * @member {number} maxPartitionCount Maximum number of named partitions of + * the service. + * @member {number} scaleIncrement The number of instances to add or remove + * during a scaling operation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AddRemoveIncrementalNamedPartitionScalingMechanism + * + * @returns {object} metadata of AddRemoveIncrementalNamedPartitionScalingMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'AddRemoveIncrementalNamedPartition', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingMechanismDescription', + className: 'AddRemoveIncrementalNamedPartitionScalingMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + minPartitionCount: { + required: true, + serializedName: 'MinPartitionCount', + type: { + name: 'Number' + } + }, + maxPartitionCount: { + required: true, + serializedName: 'MaxPartitionCount', + type: { + name: 'Number' + } + }, + scaleIncrement: { + required: true, + serializedName: 'ScaleIncrement', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AddRemoveIncrementalNamedPartitionScalingMechanism; diff --git a/lib/services/serviceFabric/lib/models/analysisEventMetadata.js b/lib/services/serviceFabric/lib/models/analysisEventMetadata.js new file mode 100644 index 0000000000..a699924e40 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/analysisEventMetadata.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Metadata about an Analysis Event. + * + */ +class AnalysisEventMetadata { + /** + * Create a AnalysisEventMetadata. + * @member {moment.duration} [delay] The analysis delay. + * @member {moment.duration} [duration] The duration of analysis. + */ + constructor() { + } + + /** + * Defines the metadata of AnalysisEventMetadata + * + * @returns {object} metadata of AnalysisEventMetadata + * + */ + mapper() { + return { + required: false, + serializedName: 'AnalysisEventMetadata', + type: { + name: 'Composite', + className: 'AnalysisEventMetadata', + modelProperties: { + delay: { + required: false, + serializedName: 'Delay', + type: { + name: 'TimeSpan' + } + }, + duration: { + required: false, + serializedName: 'Duration', + type: { + name: 'TimeSpan' + } + } + } + } + }; + } +} + +module.exports = AnalysisEventMetadata; diff --git a/lib/services/serviceFabric/lib/models/applicationBackupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/applicationBackupConfigurationInfo.js new file mode 100644 index 0000000000..103b5dba73 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationBackupConfigurationInfo.js @@ -0,0 +1,94 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Backup configuration information for a specific Service Fabric application + * specifying what backup policy is being applied and suspend description, if + * any. + * + * @extends models['BackupConfigurationInfo'] + */ +class ApplicationBackupConfigurationInfo extends models['BackupConfigurationInfo'] { + /** + * Create a ApplicationBackupConfigurationInfo. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationBackupConfigurationInfo + * + * @returns {object} metadata of ApplicationBackupConfigurationInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Application', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'BackupConfigurationInfo', + className: 'ApplicationBackupConfigurationInfo', + modelProperties: { + policyName: { + required: false, + serializedName: 'PolicyName', + type: { + name: 'String' + } + }, + policyInheritedFrom: { + required: false, + serializedName: 'PolicyInheritedFrom', + type: { + name: 'String' + } + }, + suspensionInfo: { + required: false, + serializedName: 'SuspensionInfo', + type: { + name: 'Composite', + className: 'BackupSuspensionInfo' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationName: { + required: false, + serializedName: 'ApplicationName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationBackupConfigurationInfo; diff --git a/lib/services/serviceFabric/lib/models/applicationBackupEntity.js b/lib/services/serviceFabric/lib/models/applicationBackupEntity.js new file mode 100644 index 0000000000..6123ca7d96 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationBackupEntity.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Identifies the Service Fabric application which is being backed up. + * + * @extends models['BackupEntity'] + */ +class ApplicationBackupEntity extends models['BackupEntity'] { + /** + * Create a ApplicationBackupEntity. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationBackupEntity + * + * @returns {object} metadata of ApplicationBackupEntity + * + */ + mapper() { + return { + required: false, + serializedName: 'Application', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'ApplicationBackupEntity', + modelProperties: { + entityKind: { + required: true, + serializedName: 'EntityKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationName: { + required: false, + serializedName: 'ApplicationName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationBackupEntity; diff --git a/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js b/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js index 0a9e992a4e..4e497a5990 100644 --- a/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js @@ -37,7 +37,8 @@ class ApplicationCapacityDescription { * 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 . - * @member {array} [applicationMetrics] + * @member {array} [applicationMetrics] List of application capacity metric + * description. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js b/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js new file mode 100644 index 0000000000..bcf2a77ba4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationCreatedEvent.js @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Created event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationCreatedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationCreatedEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {string} applicationDefinitionKind Application definition kind. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationCreatedEvent + * + * @returns {object} metadata of ApplicationCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationDefinitionKind: { + required: true, + serializedName: 'ApplicationDefinitionKind', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js b/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js new file mode 100644 index 0000000000..1e7137b09d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationDeletedEvent.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Deleted event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationDeletedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationDeletedEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationDeletedEvent + * + * @returns {object} metadata of ApplicationDeletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationDeleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationDeletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationDeletedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationDescription.js b/lib/services/serviceFabric/lib/models/applicationDescription.js index 9ad43310f6..52fb57b83e 100644 --- a/lib/services/serviceFabric/lib/models/applicationDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationDescription.js @@ -19,11 +19,23 @@ const models = require('./index'); class ApplicationDescription { /** * Create a ApplicationDescription. - * @member {string} name - * @member {string} typeName - * @member {string} typeVersion - * @member {array} [parameterList] - * @member {object} [applicationCapacity] + * @member {string} name The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} typeName The application type name as defined in the + * application manifest. + * @member {string} typeVersion The version of the application type as + * defined in the application manifest. + * @member {array} [parameterList] List of application parameters with + * overridden values from their default values specified in the application + * manifest. + * @member {object} [applicationCapacity] 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 * @member {number} [applicationCapacity.minimumNodes] 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 @@ -35,7 +47,8 @@ class ApplicationDescription { * 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. - * @member {array} [applicationCapacity.applicationMetrics] + * @member {array} [applicationCapacity.applicationMetrics] List of + * application capacity metric description. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationEvent.js b/lib/services/serviceFabric/lib/models/applicationEvent.js new file mode 100644 index 0000000000..ec73ad890c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationEvent.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Application Events. + * + * @extends models['FabricEvent'] + */ +class ApplicationEvent extends models['FabricEvent'] { + /** + * Create a ApplicationEvent. + * @member {string} applicationId The identity of the application. This is an + * encoded representation of the application name. This is used in the REST + * APIs to identify the application resource. + * Starting in version 6.0, hierarchical names are delimited with the "\~" + * character. For example, if the application name is "fabric:/myapp/app1", + * the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" + * in previous versions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationEvent + * + * @returns {object} metadata of ApplicationEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationHealth.js b/lib/services/serviceFabric/lib/models/applicationHealth.js index 5008af00f0..1d6e419f15 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealth.js +++ b/lib/services/serviceFabric/lib/models/applicationHealth.js @@ -22,7 +22,8 @@ const models = require('./index'); class ApplicationHealth extends models['EntityHealth'] { /** * Create a ApplicationHealth. - * @member {string} [name] + * @member {string} [name] The name of the application, including the + * 'fabric:' URI scheme. * @member {array} [serviceHealthStates] Service health states as found in * the health store. * @member {array} [deployedApplicationHealthStates] Deployed application diff --git a/lib/services/serviceFabric/lib/models/applicationHealthEvaluation.js b/lib/services/serviceFabric/lib/models/applicationHealthEvaluation.js index a1bb40d5dc..cd8d63a749 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthEvaluation.js @@ -22,8 +22,12 @@ const models = require('./index'); class ApplicationHealthEvaluation extends models['HealthEvaluation'] { /** * Create a ApplicationHealthEvaluation. - * @member {string} [applicationName] - * @member {array} [unhealthyEvaluations] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -41,6 +45,11 @@ class ApplicationHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Application', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ApplicationHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -60,6 +69,7 @@ class ApplicationHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js index 523098d0e6..04c141cffd 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js @@ -21,7 +21,9 @@ const models = require('./index'); class ApplicationHealthPolicies { /** * Create a ApplicationHealthPolicies. - * @member {array} [applicationHealthPolicyMap] + * @member {array} [applicationHealthPolicyMap] The wrapper that contains the + * map with application health policies used to evaluate specific + * applications in the cluster. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js index f26e60a3e7..40b89deeb3 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js @@ -35,7 +35,8 @@ class ApplicationHealthPolicy { * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. * . Default value: 0 . - * @member {object} [defaultServiceTypeHealthPolicy] + * @member {object} [defaultServiceTypeHealthPolicy] The health policy used + * by default to evaluate the health of a service type. * @member {number} * [defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -76,7 +77,8 @@ class ApplicationHealthPolicy { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [serviceTypeHealthPolicyMap] + * @member {array} [serviceTypeHealthPolicyMap] The map with service type + * health policy per service type name. The map is empty by default. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js index 12c0600081..37822466de 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js @@ -20,8 +20,10 @@ const models = require('./index'); class ApplicationHealthPolicyMapItem { /** * Create a ApplicationHealthPolicyMapItem. - * @member {string} key - * @member {object} value + * @member {string} key The key of the application health policy map item. + * This is the name of the application. + * @member {object} value The value of the application health policy map + * item. This is the ApplicationHealthPolicy for this application. * @member {boolean} [value.considerWarningAsError] Indicates whether * warnings are treated with the same severity as errors. * @member {number} [value.maxPercentUnhealthyDeployedApplications] The @@ -35,7 +37,8 @@ class ApplicationHealthPolicyMapItem { * deployed on in the cluster. * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. - * @member {object} [value.defaultServiceTypeHealthPolicy] + * @member {object} [value.defaultServiceTypeHealthPolicy] The health policy + * used by default to evaluate the health of a service type. * @member {number} * [value.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -76,7 +79,8 @@ class ApplicationHealthPolicyMapItem { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [value.serviceTypeHealthPolicyMap] + * @member {array} [value.serviceTypeHealthPolicyMap] The map with service + * type health policy per service type name. The map is empty by default. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/applicationHealthReportCreatedEvent.js new file mode 100644 index 0000000000..a721add24a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationHealthReportCreatedEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationHealthReportCreatedEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationHealthReportCreatedEvent. + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationHealthReportCreatedEvent + * + * @returns {object} metadata of ApplicationHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ApplicationHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js new file mode 100644 index 0000000000..d1048af4a2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationHealthReportExpiredEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Health Report Expired event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationHealthReportExpiredEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationHealthReportExpiredEvent. + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationHealthReportExpiredEvent + * + * @returns {object} metadata of ApplicationHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ApplicationHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationHealthState.js b/lib/services/serviceFabric/lib/models/applicationHealthState.js index 689d7efdc2..757358f881 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthState.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthState.js @@ -22,7 +22,8 @@ const models = require('./index'); class ApplicationHealthState extends models['EntityHealthState'] { /** * Create a ApplicationHealthState. - * @member {string} [name] + * @member {string} [name] The name of the application, including the + * 'fabric:' URI scheme. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js b/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js index 14699cf73d..f583313177 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js @@ -24,12 +24,18 @@ const models = require('./index'); class ApplicationHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a ApplicationHealthStateChunk. - * @member {string} [applicationName] - * @member {string} [applicationTypeName] - * @member {object} [serviceHealthStateChunks] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [applicationTypeName] The application type name as + * defined in the application manifest. + * @member {object} [serviceHealthStateChunks] The list of service health + * state chunks in the cluster that respect the filters in the cluster health + * chunk query description. * @member {array} [serviceHealthStateChunks.items] The list of service * health state chunks that respect the input filters in the chunk query. - * @member {object} [deployedApplicationHealthStateChunks] + * @member {object} [deployedApplicationHealthStateChunks] The list of + * deployed application health state chunks in the cluster that respect the + * filters in the cluster health chunk query description. * @member {array} [deployedApplicationHealthStateChunks.items] The list of * deployed application health state chunks that respect the input filters in * the chunk query. diff --git a/lib/services/serviceFabric/lib/models/applicationInfo.js b/lib/services/serviceFabric/lib/models/applicationInfo.js index 58b39e6f10..f747e6bcac 100644 --- a/lib/services/serviceFabric/lib/models/applicationInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationInfo.js @@ -19,17 +19,32 @@ const models = require('./index'); class ApplicationInfo { /** * Create a ApplicationInfo. - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [typeVersion] - * @member {string} [status] Possible values include: 'Invalid', 'Ready', - * 'Upgrading', 'Creating', 'Deleting', 'Failed' - * @member {array} [parameters] - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [applicationDefinitionKind] Possible values include: - * 'Invalid', 'ServiceFabricApplicationDescription', 'Compose' + * @member {string} [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. + * @member {string} [name] The name of the application, including the + * 'fabric:' URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [typeVersion] The version of the application type as + * defined in the application manifest. + * @member {string} [status] The status of the application. + * . Possible values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' + * @member {array} [parameters] List of application parameters with + * overridden values from their default values specified in the application + * manifest. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [applicationDefinitionKind] The mechanism used to define + * a Service Fabric application. + * . Possible values include: 'Invalid', + * 'ServiceFabricApplicationDescription', 'Compose' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationLoadInfo.js b/lib/services/serviceFabric/lib/models/applicationLoadInfo.js index 283e6a9f58..d506ff83d9 100644 --- a/lib/services/serviceFabric/lib/models/applicationLoadInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationLoadInfo.js @@ -19,7 +19,13 @@ const models = require('./index'); class ApplicationLoadInfo { /** * Create a ApplicationLoadInfo. - * @member {string} [id] + * @member {string} [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. * @member {number} [minimumNodes] The minimum number of nodes for this * application. * It is the number of nodes where Service Fabric will reserve Capacity in @@ -36,7 +42,8 @@ class ApplicationLoadInfo { * is instantiated. * For applications that do not have application capacity defined this value * will be zero. - * @member {array} [applicationLoadMetricInformation] + * @member {array} [applicationLoadMetricInformation] List of application + * capacity metric description. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationNameInfo.js b/lib/services/serviceFabric/lib/models/applicationNameInfo.js index c4013e17c7..3af6929198 100644 --- a/lib/services/serviceFabric/lib/models/applicationNameInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationNameInfo.js @@ -17,8 +17,15 @@ class ApplicationNameInfo { /** * Create a ApplicationNameInfo. - * @member {string} [id] - * @member {string} [name] + * @member {string} [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. + * @member {string} [name] The name of the application, including the + * 'fabric:' URI scheme. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationTypeApplicationsHealthEvaluation.js b/lib/services/serviceFabric/lib/models/applicationTypeApplicationsHealthEvaluation.js index 4f24256117..74aadd25f7 100644 --- a/lib/services/serviceFabric/lib/models/applicationTypeApplicationsHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/applicationTypeApplicationsHealthEvaluation.js @@ -25,13 +25,17 @@ const models = require('./index'); class ApplicationTypeApplicationsHealthEvaluation extends models['HealthEvaluation'] { /** * Create a ApplicationTypeApplicationsHealthEvaluation. - * @member {string} [applicationTypeName] + * @member {string} [applicationTypeName] The application type name as + * defined in the application manifest. * @member {number} [maxPercentUnhealthyApplications] Maximum allowed * percentage of unhealthy applications for the application type, specified * as an entry in ApplicationTypeHealthPolicyMap. * @member {number} [totalCount] Total number of applications of the * application type found in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -49,6 +53,11 @@ class ApplicationTypeApplicationsHealthEvaluation extends models['HealthEvaluati serializedName: 'ApplicationTypeApplications', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ApplicationTypeApplicationsHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -68,6 +77,7 @@ class ApplicationTypeApplicationsHealthEvaluation extends models['HealthEvaluati kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/applicationTypeInfo.js b/lib/services/serviceFabric/lib/models/applicationTypeInfo.js index fd837207b5..bee3d77da5 100644 --- a/lib/services/serviceFabric/lib/models/applicationTypeInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationTypeInfo.js @@ -19,14 +19,21 @@ const models = require('./index'); class ApplicationTypeInfo { /** * Create a ApplicationTypeInfo. - * @member {string} [name] - * @member {string} [version] - * @member {array} [defaultParameterList] - * @member {string} [status] Possible values include: 'Invalid', - * 'Provisioning', 'Available', 'Unprovisioning', 'Failed' - * @member {string} [statusDetails] - * @member {string} [applicationTypeDefinitionKind] Possible values include: - * 'Invalid', 'ServiceFabricApplicationPackage', 'Compose' + * @member {string} [name] The application type name as defined in the + * application manifest. + * @member {string} [version] The version of the application type as defined + * in the application manifest. + * @member {array} [defaultParameterList] List of application type parameters + * that can be overridden when creating or updating the application. + * @member {string} [status] The status of the application type. + * . Possible values include: 'Invalid', 'Provisioning', 'Available', + * 'Unprovisioning', 'Failed' + * @member {string} [statusDetails] Additional detailed information about the + * status of the application type. + * @member {string} [applicationTypeDefinitionKind] The mechanism used to + * define a Service Fabric application type. + * . Possible values include: 'Invalid', 'ServiceFabricApplicationPackage', + * 'Compose' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeCompleteEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeCompleteEvent.js new file mode 100644 index 0000000000..c170d9bf04 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeCompleteEvent.js @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Complete event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeCompleteEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeCompleteEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeCompleteEvent + * + * @returns {object} metadata of ApplicationUpgradeCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js index 559db2bbc7..334bb7f0f2 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js @@ -27,26 +27,69 @@ const models = require('./index'); class ApplicationUpgradeDescription { /** * Create a ApplicationUpgradeDescription. - * @member {string} name - * @member {string} targetApplicationTypeVersion - * @member {array} parameters - * @member {string} upgradeKind Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} name The name of the target application, including the + * 'fabric:' URI scheme. + * @member {string} targetApplicationTypeVersion The target application type + * version (found in the application manifest) for the application upgrade. + * @member {array} parameters List of application parameters with overridden + * values from their default values specified in the application manifest. + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for + * monitoring an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * [monitoringPolicy.healthCheckStableDurationInMilliseconds] 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @member {number} @@ -62,6 +105,8 @@ class ApplicationUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service + * type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -102,7 +147,9 @@ class ApplicationUpgradeDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The + * map with service type health policy per service type name. The map is + * empty by default. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompleteEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompleteEvent.js new file mode 100644 index 0000000000..b8673fb9e0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeDomainCompleteEvent.js @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Domain Complete event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeDomainCompleteEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeDomainCompleteEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} upgradeState State of upgrade. + * @member {string} upgradeDomains Upgrade domains. + * @member {number} upgradeDomainElapsedTimeInMs Upgrade time of domain in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeDomainCompleteEvent + * + * @returns {object} metadata of ApplicationUpgradeDomainCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeDomainComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeDomainCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + upgradeState: { + required: true, + serializedName: 'UpgradeState', + type: { + name: 'String' + } + }, + upgradeDomains: { + required: true, + serializedName: 'UpgradeDomains', + type: { + name: 'String' + } + }, + upgradeDomainElapsedTimeInMs: { + required: true, + serializedName: 'UpgradeDomainElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeDomainCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js index 00b1f52b92..36a91f94a1 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js @@ -19,42 +19,107 @@ const models = require('./index'); class ApplicationUpgradeProgressInfo { /** * Create a ApplicationUpgradeProgressInfo. - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [targetApplicationTypeVersion] - * @member {array} [upgradeDomains] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', + * @member {string} [name] The name of the target application, including the + * 'fabric:' URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [targetApplicationTypeVersion] The target application + * type version (found in the application manifest) for the application + * upgrade. + * @member {array} [upgradeDomains] List of upgrade domains and their + * statuses. + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', + * 'RollingBackCompleted', 'RollingForwardPending', * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' - * @member {string} [nextUpgradeDomain] - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} [nextUpgradeDomain] The name of the next upgrade domain + * to be processed. + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {object} [upgradeDescription] - * @member {string} [upgradeDescription.name] - * @member {string} [upgradeDescription.targetApplicationTypeVersion] - * @member {array} [upgradeDescription.parameters] - * @member {string} [upgradeDescription.upgradeKind] Possible values include: - * 'Invalid', 'Rolling' - * @member {string} [upgradeDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {object} [upgradeDescription] Describes the parameters for an + * application upgrade. Please note that upgrade description replaces the + * existing application description. This means that if the parameters are + * not specified, the existing parameters on the applications will be + * overwritten with the empty parameters list. This would results in + * application using the default value of the parameters from the application + * manifest. If you do not want to change any existing parameter values, + * please get the application parameters first using the GetApplicationInfo + * query and then supply those values as Parameters in this + * ApplicationUpgradeDescription. + * @member {string} [upgradeDescription.name] The name of the target + * application, including the 'fabric:' URI scheme. + * @member {string} [upgradeDescription.targetApplicationTypeVersion] The + * target application type version (found in the application manifest) for + * the application upgrade. + * @member {array} [upgradeDescription.parameters] List of application + * parameters with overridden values from their default values specified in + * the application manifest. + * @member {string} [upgradeDescription.upgradeKind] The kind of upgrade out + * of the following possible values. Possible values include: 'Invalid', + * 'Rolling' + * @member {string} [upgradeDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * @member {number} - * [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [upgradeDescription.forceRestart] - * @member {object} [upgradeDescription.monitoringPolicy] - * @member {string} [upgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [upgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * @member {object} [upgradeDescription.monitoringPolicy] Describes the + * parameters for monitoring an upgrade in Monitored mode. + * @member {string} [upgradeDescription.monitoringPolicy.failureAction] 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' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] 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. * @member {string} * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [upgradeDescription.applicationHealthPolicy] + * 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. + * @member {object} [upgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. * @member {boolean} * [upgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -72,6 +137,8 @@ class ApplicationUpgradeProgressInfo { * nodes. Default percentage is zero. * @member {object} * [upgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service + * type. * @member {number} * [upgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -114,23 +181,34 @@ class ApplicationUpgradeProgressInfo { * services. Default percentage is zero. * @member {array} * [upgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * @member {string} [upgradeDurationInMilliseconds] The estimated total * amount of time spent processing the overall upgrade. * @member {string} [upgradeDomainDurationInMilliseconds] The estimated total * amount of time spent processing the current upgrade domain. - * @member {array} [unhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] + * @member {array} [unhealthyEvaluations] List of health evaluations that + * resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] + * List of upgrading nodes and their statuses * @member {string} [startTimestampUtc] The estimated UTC datetime when the * upgrade started. * @member {string} [failureTimestampUtc] The estimated UTC datetime when the * upgrade failed and FailureAction was executed. - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] Information about the + * upgrade domain progress at the time of upgrade failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of + * the upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] + * List of upgrading nodes and their statuses * @member {string} [upgradeStatusDetails] Additional detailed information * about the status of the pending upgrade. */ diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompleteEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompleteEvent.js new file mode 100644 index 0000000000..7006904206 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackCompleteEvent.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Rollback Complete event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeRollbackCompleteEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeRollbackCompleteEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {string} failureReason Describes reason of failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeRollbackCompleteEvent + * + * @returns {object} metadata of ApplicationUpgradeRollbackCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeRollbackComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeRollbackCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeRollbackCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartEvent.js new file mode 100644 index 0000000000..6477776fea --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeRollbackStartEvent.js @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Rollback Start event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeRollbackStartEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeRollbackStartEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} failureReason Describes reason of failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeRollbackStartEvent + * + * @returns {object} metadata of ApplicationUpgradeRollbackStartEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeRollbackStart', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeRollbackStartEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeRollbackStartEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeStartEvent.js b/lib/services/serviceFabric/lib/models/applicationUpgradeStartEvent.js new file mode 100644 index 0000000000..929fa59bc5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeStartEvent.js @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Application Upgrade Start event. + * + * @extends models['ApplicationEvent'] + */ +class ApplicationUpgradeStartEvent extends models['ApplicationEvent'] { + /** + * Create a ApplicationUpgradeStartEvent. + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} upgradeType Type of upgrade. + * @member {string} rollingUpgradeMode Mode of upgrade. + * @member {string} failureAction Action if failed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ApplicationUpgradeStartEvent + * + * @returns {object} metadata of ApplicationUpgradeStartEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationUpgradeStart', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationUpgradeStartEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + currentApplicationTypeVersion: { + required: true, + serializedName: 'CurrentApplicationTypeVersion', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + upgradeType: { + required: true, + serializedName: 'UpgradeType', + type: { + name: 'String' + } + }, + rollingUpgradeMode: { + required: true, + serializedName: 'RollingUpgradeMode', + type: { + name: 'String' + } + }, + failureAction: { + required: true, + serializedName: 'FailureAction', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationUpgradeStartEvent; diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js index eace142442..c2cc4604c1 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js @@ -19,10 +19,13 @@ const models = require('./index'); class ApplicationUpgradeUpdateDescription { /** * Create a ApplicationUpgradeUpdateDescription. - * @member {string} name - * @member {string} upgradeKind Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {object} [applicationHealthPolicy] + * @member {string} name The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @member {number} @@ -38,6 +41,8 @@ class ApplicationUpgradeUpdateDescription { * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service + * type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -78,20 +83,60 @@ class ApplicationUpgradeUpdateDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] - * @member {object} [updateDescription] - * @member {string} [updateDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * @member {boolean} [updateDescription.forceRestart] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The + * map with service type health policy per service type name. The map is + * empty by default. + * @member {object} [updateDescription] Describes the parameters for updating + * a rolling upgrade of application or cluster. + * @member {string} [updateDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {boolean} [updateDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). * @member {number} [updateDescription.replicaSetCheckTimeoutInMilliseconds] - * @member {string} [updateDescription.failureAction] Possible values - * include: 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {string} [updateDescription.failureAction] 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' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [updateDescription.healthCheckStableDurationInMilliseconds] + * [updateDescription.healthCheckStableDurationInMilliseconds] 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. * @member {string} [updateDescription.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] 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. * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationsHealthEvaluation.js b/lib/services/serviceFabric/lib/models/applicationsHealthEvaluation.js index 505b052850..1fe4b88c60 100644 --- a/lib/services/serviceFabric/lib/models/applicationsHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/applicationsHealthEvaluation.js @@ -26,7 +26,9 @@ class ApplicationsHealthEvaluation extends models['HealthEvaluation'] { * percentage of unhealthy applications from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of applications from the health * store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ApplicationHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -44,6 +46,11 @@ class ApplicationsHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Applications', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ApplicationsHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -63,6 +70,7 @@ class ApplicationsHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/averagePartitionLoadScalingTrigger.js b/lib/services/serviceFabric/lib/models/averagePartitionLoadScalingTrigger.js new file mode 100644 index 0000000000..08e176c524 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/averagePartitionLoadScalingTrigger.js @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents a scaling trigger related to an average load of a metric/resource + * of a partition. + * + * @extends models['ScalingTriggerDescription'] + */ +class AveragePartitionLoadScalingTrigger extends models['ScalingTriggerDescription'] { + /** + * Create a AveragePartitionLoadScalingTrigger. + * @member {string} metricName The name of the metric for which usage should + * be tracked. + * @member {string} lowerLoadThreshold The lower limit of the load below + * which a scale in operation should be performed. + * @member {string} upperLoadThreshold The upper limit of the load beyond + * which a scale out operation should be performed. + * @member {number} scaleIntervalInSeconds The period in seconds on which a + * decision is made whether to scale or not. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AveragePartitionLoadScalingTrigger + * + * @returns {object} metadata of AveragePartitionLoadScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AveragePartitionLoad', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingTriggerDescription', + className: 'AveragePartitionLoadScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + metricName: { + required: true, + serializedName: 'MetricName', + type: { + name: 'String' + } + }, + lowerLoadThreshold: { + required: true, + serializedName: 'LowerLoadThreshold', + type: { + name: 'String' + } + }, + upperLoadThreshold: { + required: true, + serializedName: 'UpperLoadThreshold', + type: { + name: 'String' + } + }, + scaleIntervalInSeconds: { + required: true, + serializedName: 'ScaleIntervalInSeconds', + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AveragePartitionLoadScalingTrigger; diff --git a/lib/services/serviceFabric/lib/models/averageServiceLoadScalingTrigger.js b/lib/services/serviceFabric/lib/models/averageServiceLoadScalingTrigger.js new file mode 100644 index 0000000000..fef69e06dc --- /dev/null +++ b/lib/services/serviceFabric/lib/models/averageServiceLoadScalingTrigger.js @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents a scaling policy related to an average load of a metric/resource + * of a service. + * + * @extends models['ScalingTriggerDescription'] + */ +class AverageServiceLoadScalingTrigger extends models['ScalingTriggerDescription'] { + /** + * Create a AverageServiceLoadScalingTrigger. + * @member {string} metricName The name of the metric for which usage should + * be tracked. + * @member {string} lowerLoadThreshold The lower limit of the load below + * which a scale in operation should be performed. + * @member {string} upperLoadThreshold The upper limit of the load beyond + * which a scale out operation should be performed. + * @member {number} scaleIntervalInSeconds The period in seconds on which a + * decision is made whether to scale or not. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AverageServiceLoadScalingTrigger + * + * @returns {object} metadata of AverageServiceLoadScalingTrigger + * + */ + mapper() { + return { + required: false, + serializedName: 'AverageServiceLoad', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingTriggerDescription', + className: 'AverageServiceLoadScalingTrigger', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + metricName: { + required: true, + serializedName: 'MetricName', + type: { + name: 'String' + } + }, + lowerLoadThreshold: { + required: true, + serializedName: 'LowerLoadThreshold', + type: { + name: 'String' + } + }, + upperLoadThreshold: { + required: true, + serializedName: 'UpperLoadThreshold', + type: { + name: 'String' + } + }, + scaleIntervalInSeconds: { + required: true, + serializedName: 'ScaleIntervalInSeconds', + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = AverageServiceLoadScalingTrigger; diff --git a/lib/services/serviceFabric/lib/models/azureBlobBackupStorageDescription.js b/lib/services/serviceFabric/lib/models/azureBlobBackupStorageDescription.js new file mode 100644 index 0000000000..dc76deffea --- /dev/null +++ b/lib/services/serviceFabric/lib/models/azureBlobBackupStorageDescription.js @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the parameters for Azure blob store used for storing and + * enumerating backups. + * + * @extends models['BackupStorageDescription'] + */ +class AzureBlobBackupStorageDescription extends models['BackupStorageDescription'] { + /** + * Create a AzureBlobBackupStorageDescription. + * @member {string} connectionString The connection string to connect to the + * Azure blob store. + * @member {string} containerName The name of the container in the blob store + * to store and enumerate backups from. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureBlobBackupStorageDescription + * + * @returns {object} metadata of AzureBlobBackupStorageDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureBlobStore', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'AzureBlobBackupStorageDescription', + modelProperties: { + friendlyName: { + required: false, + serializedName: 'FriendlyName', + type: { + name: 'String' + } + }, + storageKind: { + required: true, + serializedName: 'StorageKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + connectionString: { + required: true, + serializedName: 'ConnectionString', + type: { + name: 'String' + } + }, + containerName: { + required: true, + serializedName: 'ContainerName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureBlobBackupStorageDescription; diff --git a/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js new file mode 100644 index 0000000000..33cbec8155 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the backup configuration information. + * + */ +class BackupConfigurationInfo { + /** + * Create a BackupConfigurationInfo. + * @member {string} [policyName] The name of the backup policy which is + * applicable to this Service Fabric application or service or partition. + * @member {string} [policyInheritedFrom] Specifies the scope at which the + * backup policy is applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', + * 'Application' + * @member {object} [suspensionInfo] Describes the backup suspension details. + * @member {boolean} [suspensionInfo.isSuspended] Indicates whether periodic + * backup is suspended at this level or not. + * @member {string} [suspensionInfo.suspensionInheritedFrom] Specifies the + * scope at which the backup suspension was applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', + * 'Application' + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupConfigurationInfo + * + * @returns {object} metadata of BackupConfigurationInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupConfigurationInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'BackupConfigurationInfo', + className: 'BackupConfigurationInfo', + modelProperties: { + policyName: { + required: false, + serializedName: 'PolicyName', + type: { + name: 'String' + } + }, + policyInheritedFrom: { + required: false, + serializedName: 'PolicyInheritedFrom', + type: { + name: 'String' + } + }, + suspensionInfo: { + required: false, + serializedName: 'SuspensionInfo', + type: { + name: 'Composite', + className: 'BackupSuspensionInfo' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupConfigurationInfo; diff --git a/lib/services/serviceFabric/lib/models/backupEntity.js b/lib/services/serviceFabric/lib/models/backupEntity.js new file mode 100644 index 0000000000..212d013b61 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupEntity.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the Service Fabric entity that is configured for backup. + * + */ +class BackupEntity { + /** + * Create a BackupEntity. + * @member {string} entityKind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupEntity + * + * @returns {object} metadata of BackupEntity + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupEntity', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'BackupEntity', + modelProperties: { + entityKind: { + required: true, + serializedName: 'EntityKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupEntity; diff --git a/lib/services/serviceFabric/lib/models/backupInfo.js b/lib/services/serviceFabric/lib/models/backupInfo.js new file mode 100644 index 0000000000..c206038141 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupInfo.js @@ -0,0 +1,323 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents a backup point which can be used to trigger a restore. + * + */ +class BackupInfo { + /** + * Create a BackupInfo. + * @member {uuid} [backupId] Unique backup ID . + * @member {uuid} [backupChainId] 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. + * @member {string} [applicationName] Name of the Service Fabric application + * this partition backup belongs to. + * @member {string} [serviceName] Name of the Service Fabric service this + * partition backup belongs to. + * @member {object} [partitionInformation] Information about the partition to + * which this backup belongs to + * @member {uuid} [partitionInformation.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. + * @member {string} [partitionInformation.servicePartitionKind] Polymorphic + * Discriminator + * @member {string} [backupLocation] Location of the backup, relative to the + * backup store. + * @member {string} [backupType] Describes the type of backup, whether its + * full or incremental. + * . Possible values include: 'Invalid', 'Full', 'Incremental' + * @member {object} [epochOfLastBackupRecord] Epoch of the last record in + * this backup. + * @member {string} [epochOfLastBackupRecord.configurationVersion] 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. + * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * dataloss 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. + * @member {string} [lsnOfLastBackupRecord] LSN of the last record in this + * backup. + * @member {date} [creationTimeUtc] The date time when this backup was taken. + * @member {object} [failureError] Denotes the failure encountered in getting + * backup point information. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ + constructor() { + } + + /** + * Defines the metadata of BackupInfo + * + * @returns {object} metadata of BackupInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupInfo', + type: { + name: 'Composite', + className: 'BackupInfo', + modelProperties: { + backupId: { + required: false, + serializedName: 'BackupId', + type: { + name: 'String' + } + }, + backupChainId: { + required: false, + serializedName: 'BackupChainId', + type: { + name: 'String' + } + }, + applicationName: { + required: false, + serializedName: 'ApplicationName', + type: { + name: 'String' + } + }, + serviceName: { + required: false, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + partitionInformation: { + required: false, + serializedName: 'PartitionInformation', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServicePartitionKind', + clientName: 'servicePartitionKind' + }, + uberParent: 'PartitionInformation', + className: 'PartitionInformation' + } + }, + backupLocation: { + required: false, + serializedName: 'BackupLocation', + type: { + name: 'String' + } + }, + backupType: { + required: false, + serializedName: 'BackupType', + type: { + name: 'String' + } + }, + epochOfLastBackupRecord: { + required: false, + serializedName: 'EpochOfLastBackupRecord', + type: { + name: 'Composite', + className: 'Epoch' + } + }, + lsnOfLastBackupRecord: { + required: false, + serializedName: 'LsnOfLastBackupRecord', + type: { + name: 'String' + } + }, + creationTimeUtc: { + required: false, + serializedName: 'CreationTimeUtc', + type: { + name: 'DateTime' + } + }, + failureError: { + required: false, + serializedName: 'FailureError', + type: { + name: 'Composite', + className: 'FabricErrorError' + } + } + } + } + }; + } +} + +module.exports = BackupInfo; diff --git a/lib/services/serviceFabric/lib/models/backupPartitionDescription.js b/lib/services/serviceFabric/lib/models/backupPartitionDescription.js new file mode 100644 index 0000000000..b1c91fc8f5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupPartitionDescription.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the parameters for triggering partition's backup. + * + */ +class BackupPartitionDescription { + /** + * Create a BackupPartitionDescription. + * @member {object} [backupStorage] Specifies the details of the backup + * storage where to save the backup. + * @member {string} [backupStorage.friendlyName] Friendly name for this + * backup storage. + * @member {string} [backupStorage.storageKind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupPartitionDescription + * + * @returns {object} metadata of BackupPartitionDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupPartitionDescription', + type: { + name: 'Composite', + className: 'BackupPartitionDescription', + modelProperties: { + backupStorage: { + required: false, + serializedName: 'BackupStorage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'BackupStorageDescription' + } + } + } + } + }; + } +} + +module.exports = BackupPartitionDescription; diff --git a/lib/services/serviceFabric/lib/models/backupPolicyDescription.js b/lib/services/serviceFabric/lib/models/backupPolicyDescription.js new file mode 100644 index 0000000000..6cdf8321b6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupPolicyDescription.js @@ -0,0 +1,115 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a backup policy for configuring periodic backup. + * + */ +class BackupPolicyDescription { + /** + * Create a BackupPolicyDescription. + * @member {string} name The unique name identifying this backup policy. + * @member {boolean} autoRestoreOnDataLoss Specifies whether to trigger + * restore automatically using the latest available backup in case the + * partition experiences a data loss event. + * @member {number} maxIncrementalBackups 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. + * @member {object} schedule Describes the backup schedule parameters. + * @member {string} [schedule.scheduleKind] Polymorphic Discriminator + * @member {object} storage Describes the details of backup storage where to + * store the periodic backups. + * @member {string} [storage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [storage.storageKind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupPolicyDescription + * + * @returns {object} metadata of BackupPolicyDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupPolicyDescription', + type: { + name: 'Composite', + className: 'BackupPolicyDescription', + modelProperties: { + name: { + required: true, + serializedName: 'Name', + type: { + name: 'String' + } + }, + autoRestoreOnDataLoss: { + required: true, + serializedName: 'AutoRestoreOnDataLoss', + type: { + name: 'Boolean' + } + }, + maxIncrementalBackups: { + required: true, + serializedName: 'MaxIncrementalBackups', + constraints: { + InclusiveMaximum: 255, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + schedule: { + required: true, + serializedName: 'Schedule', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ScheduleKind', + clientName: 'scheduleKind' + }, + uberParent: 'BackupScheduleDescription', + className: 'BackupScheduleDescription' + } + }, + storage: { + required: true, + serializedName: 'Storage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'BackupStorageDescription' + } + } + } + } + }; + } +} + +module.exports = BackupPolicyDescription; diff --git a/lib/services/serviceFabric/lib/models/backupProgressInfo.js b/lib/services/serviceFabric/lib/models/backupProgressInfo.js new file mode 100644 index 0000000000..2bb6bccee2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupProgressInfo.js @@ -0,0 +1,275 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the progress of a partition's backup. + * + */ +class BackupProgressInfo { + /** + * Create a BackupProgressInfo. + * @member {string} [backupState] Represents the current state of the + * partition backup operation. + * . Possible values include: 'Invalid', 'Accepted', 'BackupInProgress', + * 'Success', 'Failure', 'Timeout' + * @member {date} [timeStampUtc] TimeStamp in UTC when operation succeeded or + * failed. + * @member {uuid} [backupId] Unique ID of the newly created backup. + * @member {string} [backupLocation] Location, relative to the backup store, + * of the newly created backup. + * @member {object} [epochOfLastBackupRecord] Specifies the epoch of the last + * record included in backup. + * @member {string} [epochOfLastBackupRecord.configurationVersion] 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. + * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * dataloss 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. + * @member {string} [lsnOfLastBackupRecord] The LSN of last record included + * in backup. + * @member {object} [failureError] Denotes the failure encountered in + * performing backup operation. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ + constructor() { + } + + /** + * Defines the metadata of BackupProgressInfo + * + * @returns {object} metadata of BackupProgressInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupProgressInfo', + type: { + name: 'Composite', + className: 'BackupProgressInfo', + modelProperties: { + backupState: { + required: false, + serializedName: 'BackupState', + type: { + name: 'String' + } + }, + timeStampUtc: { + required: false, + serializedName: 'TimeStampUtc', + type: { + name: 'DateTime' + } + }, + backupId: { + required: false, + serializedName: 'BackupId', + type: { + name: 'String' + } + }, + backupLocation: { + required: false, + serializedName: 'BackupLocation', + type: { + name: 'String' + } + }, + epochOfLastBackupRecord: { + required: false, + serializedName: 'EpochOfLastBackupRecord', + type: { + name: 'Composite', + className: 'Epoch' + } + }, + lsnOfLastBackupRecord: { + required: false, + serializedName: 'LsnOfLastBackupRecord', + type: { + name: 'String' + } + }, + failureError: { + required: false, + serializedName: 'FailureError', + type: { + name: 'Composite', + className: 'FabricErrorError' + } + } + } + } + }; + } +} + +module.exports = BackupProgressInfo; diff --git a/lib/services/serviceFabric/lib/models/backupScheduleDescription.js b/lib/services/serviceFabric/lib/models/backupScheduleDescription.js new file mode 100644 index 0000000000..6cb850c06d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupScheduleDescription.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the backup schedule parameters. + * + */ +class BackupScheduleDescription { + /** + * Create a BackupScheduleDescription. + * @member {string} scheduleKind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupScheduleDescription + * + * @returns {object} metadata of BackupScheduleDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupScheduleDescription', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ScheduleKind', + clientName: 'scheduleKind' + }, + uberParent: 'BackupScheduleDescription', + className: 'BackupScheduleDescription', + modelProperties: { + scheduleKind: { + required: true, + serializedName: 'ScheduleKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupScheduleDescription; diff --git a/lib/services/serviceFabric/lib/models/backupStorageDescription.js b/lib/services/serviceFabric/lib/models/backupStorageDescription.js new file mode 100644 index 0000000000..ce941b0c9a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupStorageDescription.js @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the parameters for the backup storage. + * + */ +class BackupStorageDescription { + /** + * Create a BackupStorageDescription. + * @member {string} [friendlyName] Friendly name for this backup storage. + * @member {string} storageKind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of BackupStorageDescription + * + * @returns {object} metadata of BackupStorageDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupStorageDescription', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'BackupStorageDescription', + modelProperties: { + friendlyName: { + required: false, + serializedName: 'FriendlyName', + type: { + name: 'String' + } + }, + storageKind: { + required: true, + serializedName: 'StorageKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupStorageDescription; diff --git a/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js b/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js new file mode 100644 index 0000000000..0ffe751a2f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the backup suspension details. + * + * + */ +class BackupSuspensionInfo { + /** + * Create a BackupSuspensionInfo. + * @member {boolean} [isSuspended] Indicates whether periodic backup is + * suspended at this level or not. + * @member {string} [suspensionInheritedFrom] Specifies the scope at which + * the backup suspension was applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', + * 'Application' + */ + constructor() { + } + + /** + * Defines the metadata of BackupSuspensionInfo + * + * @returns {object} metadata of BackupSuspensionInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupSuspensionInfo', + type: { + name: 'Composite', + className: 'BackupSuspensionInfo', + modelProperties: { + isSuspended: { + required: false, + serializedName: 'IsSuspended', + type: { + name: 'Boolean' + } + }, + suspensionInheritedFrom: { + required: false, + serializedName: 'SuspensionInheritedFrom', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupSuspensionInfo; diff --git a/lib/services/serviceFabric/lib/models/binaryPropertyValue.js b/lib/services/serviceFabric/lib/models/binaryPropertyValue.js new file mode 100644 index 0000000000..370bf64f4b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/binaryPropertyValue.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a Service Fabric property value of type Binary. + * + * @extends models['PropertyValue'] + */ +class BinaryPropertyValue extends models['PropertyValue'] { + /** + * Create a BinaryPropertyValue. + * @member {array} data Array of bytes to be sent as an integer array. Each + * element of array is a number between 0 and 255. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of BinaryPropertyValue + * + * @returns {object} metadata of BinaryPropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'Binary', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'BinaryPropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + data: { + required: true, + serializedName: 'Data', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + } + } + } + }; + } +} + +module.exports = BinaryPropertyValue; diff --git a/lib/services/serviceFabric/lib/models/chaos.js b/lib/services/serviceFabric/lib/models/chaos.js new file mode 100644 index 0000000000..757573431c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaos.js @@ -0,0 +1,219 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Contains a description of Chaos. + * + * + */ +class Chaos { + /** + * Create a Chaos. + * @member {object} [chaosParameters] If Chaos is running, these are the + * parameters Chaos is running with. + * @member {string} [chaosParameters.timeToRunInSeconds] Total time (in + * seconds) for which Chaos will run before automatically stopping. The + * maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + * @member {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] + * 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. + * @member {number} [chaosParameters.maxConcurrentFaults] 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 -- + * 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. + * @member {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or + * disables the move primary and move secondary faults. + * @member {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] 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. + * @member {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * @member {object} [chaosParameters.clusterHealthPolicy] 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. + * @member {boolean} + * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates + * whether warnings are treated with the same severity as errors. + * @member {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * @member {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * @member {array} + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * @member {object} [chaosParameters.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. + * @member {object} [chaosParameters.context.map] Describes a map that + * contains a collection of ChaosContextMapItem's. + * @member {object} [chaosParameters.chaosTargetFilter] 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. + * @member {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] + * 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 nodetype (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. + * @member {array} + * [chaosParameters.chaosTargetFilter.applicationInclusionList] A list of + * application URI's 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. + * @member {string} [status] Current status of the Chaos run. + * . Possible values include: 'Invalid', 'Running', 'Stopped' + * @member {string} [scheduleStatus] Current status of the schedule. + * . Possible values include: 'Invalid', 'Stopped', 'Active', 'Expired', + * 'Pending' + */ + constructor() { + } + + /** + * Defines the metadata of Chaos + * + * @returns {object} metadata of Chaos + * + */ + mapper() { + return { + required: false, + serializedName: 'Chaos', + type: { + name: 'Composite', + className: 'Chaos', + modelProperties: { + chaosParameters: { + required: false, + serializedName: 'ChaosParameters', + type: { + name: 'Composite', + className: 'ChaosParameters' + } + }, + status: { + required: false, + serializedName: 'Status', + type: { + name: 'String' + } + }, + scheduleStatus: { + required: false, + serializedName: 'ScheduleStatus', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Chaos; diff --git a/lib/services/serviceFabric/lib/models/chaosContext.js b/lib/services/serviceFabric/lib/models/chaosContext.js index 5e5e92a871..7380bb9554 100644 --- a/lib/services/serviceFabric/lib/models/chaosContext.js +++ b/lib/services/serviceFabric/lib/models/chaosContext.js @@ -23,7 +23,8 @@ class ChaosContext { /** * Create a ChaosContext. - * @member {object} [map] + * @member {object} [map] Describes a map that contains a collection of + * ChaosContextMapItem's. */ constructor() { } @@ -46,7 +47,14 @@ class ChaosContext { required: false, serializedName: 'Map', type: { - name: 'Object' + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } } } } diff --git a/lib/services/serviceFabric/lib/models/chaosEvent.js b/lib/services/serviceFabric/lib/models/chaosEvent.js index ca85df84cf..7383a5aec9 100644 --- a/lib/services/serviceFabric/lib/models/chaosEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosEvent.js @@ -17,7 +17,8 @@ class ChaosEvent { /** * Create a ChaosEvent. - * @member {date} timeStampUtc + * @member {date} timeStampUtc The UTC timestamp when this Chaos event was + * generated. * @member {string} kind Polymorphic Discriminator */ constructor() { @@ -52,6 +53,7 @@ class ChaosEvent { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/chaosEventWrapper.js b/lib/services/serviceFabric/lib/models/chaosEventWrapper.js index f2ba1eeeec..3b06984be0 100644 --- a/lib/services/serviceFabric/lib/models/chaosEventWrapper.js +++ b/lib/services/serviceFabric/lib/models/chaosEventWrapper.js @@ -19,8 +19,10 @@ const models = require('./index'); class ChaosEventWrapper { /** * Create a ChaosEventWrapper. - * @member {object} [chaosEvent] - * @member {date} [chaosEvent.timeStampUtc] + * @member {object} [chaosEvent] Represents an event generated during a Chaos + * run. + * @member {date} [chaosEvent.timeStampUtc] The UTC timestamp when this Chaos + * event was generated. * @member {string} [chaosEvent.kind] Polymorphic Discriminator */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/chaosEventsSegment.js b/lib/services/serviceFabric/lib/models/chaosEventsSegment.js new file mode 100644 index 0000000000..f06319dd44 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosEventsSegment.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Contains the list of Chaos events and the continuation token to get the next + * segment. + * + * + */ +class ChaosEventsSegment { + /** + * Create a ChaosEventsSegment. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [history] List of Chaos events that meet the user-supplied + * criteria. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosEventsSegment + * + * @returns {object} metadata of ChaosEventsSegment + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosEventsSegment', + type: { + name: 'Composite', + className: 'ChaosEventsSegment', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + history: { + required: false, + serializedName: 'History', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ChaosEventWrapperElementType', + type: { + name: 'Composite', + className: 'ChaosEventWrapper' + } + } + } + } + } + } + }; + } +} + +module.exports = ChaosEventsSegment; diff --git a/lib/services/serviceFabric/lib/models/chaosMovePrimaryFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosMovePrimaryFaultScheduledEvent.js new file mode 100644 index 0000000000..d70842c54f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosMovePrimaryFaultScheduledEvent.js @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Move Primary Fault Scheduled event. + * + * @extends models['PartitionEvent'] + */ +class ChaosMovePrimaryFaultScheduledEvent extends models['PartitionEvent'] { + /** + * Create a ChaosMovePrimaryFaultScheduledEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceName Service name. + * @member {string} nodeTo The name of a Service Fabric node. + * @member {boolean} forcedMove Indicates a forced move. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosMovePrimaryFaultScheduledEvent + * + * @returns {object} metadata of ChaosMovePrimaryFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosMovePrimaryFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosMovePrimaryFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + nodeTo: { + required: true, + serializedName: 'NodeTo', + type: { + name: 'String' + } + }, + forcedMove: { + required: true, + serializedName: 'ForcedMove', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ChaosMovePrimaryFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosMoveSecondaryFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosMoveSecondaryFaultScheduledEvent.js new file mode 100644 index 0000000000..ac81e8e6be --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosMoveSecondaryFaultScheduledEvent.js @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Move Secondary Fault Scheduled event. + * + * @extends models['PartitionEvent'] + */ +class ChaosMoveSecondaryFaultScheduledEvent extends models['PartitionEvent'] { + /** + * Create a ChaosMoveSecondaryFaultScheduledEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceName Service name. + * @member {string} sourceNode The name of a Service Fabric node. + * @member {string} destinationNode The name of a Service Fabric node. + * @member {boolean} forcedMove Indicates a forced move. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosMoveSecondaryFaultScheduledEvent + * + * @returns {object} metadata of ChaosMoveSecondaryFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosMoveSecondaryFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosMoveSecondaryFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + sourceNode: { + required: true, + serializedName: 'SourceNode', + type: { + name: 'String' + } + }, + destinationNode: { + required: true, + serializedName: 'DestinationNode', + type: { + name: 'String' + } + }, + forcedMove: { + required: true, + serializedName: 'ForcedMove', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ChaosMoveSecondaryFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosParameters.js b/lib/services/serviceFabric/lib/models/chaosParameters.js index 2e99c6bdab..70a450fbcd 100644 --- a/lib/services/serviceFabric/lib/models/chaosParameters.js +++ b/lib/services/serviceFabric/lib/models/chaosParameters.js @@ -55,7 +55,11 @@ class ChaosParameters { * seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * . Default value: 30 . - * @member {object} [clusterHealthPolicy] + * @member {object} [clusterHealthPolicy] 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. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -90,8 +94,76 @@ class ChaosParameters { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [context] - * @member {object} [context.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. + * @member {object} [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. + * @member {object} [context.map] Describes a map that contains a collection + * of ChaosContextMapItem's. + * @member {object} [chaosTargetFilter] 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. + * @member {array} [chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [chaosTargetFilter.applicationInclusionList] A list of + * application URI's 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. */ constructor() { } @@ -189,6 +261,14 @@ class ChaosParameters { name: 'Composite', className: 'ChaosContext' } + }, + chaosTargetFilter: { + required: false, + serializedName: 'ChaosTargetFilter', + type: { + name: 'Composite', + className: 'ChaosTargetFilter' + } } } } diff --git a/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js b/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js new file mode 100644 index 0000000000..ae6c8d634f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js @@ -0,0 +1,206 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines an item in ChaosParametersDictionary of the Chaos Schedule. + * + * + */ +class ChaosParametersDictionaryItem { + /** + * Create a ChaosParametersDictionaryItem. + * @member {string} key The key identifying the Chaos Parameter in the + * dictionary. This key is referenced by Chaos Schedule Jobs. + * @member {object} value Defines all the parameters to configure a Chaos + * run. + * @member {string} [value.timeToRunInSeconds] Total time (in seconds) for + * which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). + * @member {number} [value.maxClusterStabilizationTimeoutInSeconds] 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. + * @member {number} [value.maxConcurrentFaults] 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 -- + * 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. + * @member {boolean} [value.enableMoveReplicaFaults] Enables or disables the + * move primary and move secondary faults. + * @member {number} [value.waitTimeBetweenFaultsInSeconds] 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. + * @member {number} [value.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * @member {object} [value.clusterHealthPolicy] 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. + * @member {boolean} [value.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * @member {number} [value.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * @member {number} + * [value.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * @member {array} [value.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * @member {object} [value.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. + * @member {object} [value.context.map] Describes a map that contains a + * collection of ChaosContextMapItem's. + * @member {object} [value.chaosTargetFilter] 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. + * @member {array} [value.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [value.chaosTargetFilter.applicationInclusionList] A list + * of application URI's 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. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosParametersDictionaryItem + * + * @returns {object} metadata of ChaosParametersDictionaryItem + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosParametersDictionaryItem', + type: { + name: 'Composite', + className: 'ChaosParametersDictionaryItem', + modelProperties: { + key: { + required: true, + serializedName: 'Key', + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'Value', + type: { + name: 'Composite', + className: 'ChaosParameters' + } + } + } + } + }; + } +} + +module.exports = ChaosParametersDictionaryItem; diff --git a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js new file mode 100644 index 0000000000..b640220691 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Remove Replica Fault Completed event. + * + * @extends models['ReplicaEvent'] + */ +class ChaosRemoveReplicaFaultCompletedEvent extends models['ReplicaEvent'] { + /** + * Create a ChaosRemoveReplicaFaultCompletedEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRemoveReplicaFaultCompletedEvent + * + * @returns {object} metadata of ChaosRemoveReplicaFaultCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRemoveReplicaFaultCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRemoveReplicaFaultCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceUri: { + required: true, + serializedName: 'ServiceUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRemoveReplicaFaultCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js new file mode 100644 index 0000000000..ee3755705c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Remove Replica Fault Scheduled event. + * + * @extends models['ReplicaEvent'] + */ +class ChaosRemoveReplicaFaultScheduledEvent extends models['ReplicaEvent'] { + /** + * Create a ChaosRemoveReplicaFaultScheduledEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRemoveReplicaFaultScheduledEvent + * + * @returns {object} metadata of ChaosRemoveReplicaFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRemoveReplicaFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRemoveReplicaFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceUri: { + required: true, + serializedName: 'ServiceUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRemoveReplicaFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultCompletedEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultCompletedEvent.js new file mode 100644 index 0000000000..600a07909e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultCompletedEvent.js @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Code Package Fault Completed event. + * + * @extends models['ApplicationEvent'] + */ +class ChaosRestartCodePackageFaultCompletedEvent extends models['ApplicationEvent'] { + /** + * Create a ChaosRestartCodePackageFaultCompletedEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} serviceManifestName Service manifest name. + * @member {string} codePackageName Code package name. + * @member {string} servicePackageActivationId Id of Service package + * activation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRestartCodePackageFaultCompletedEvent + * + * @returns {object} metadata of ChaosRestartCodePackageFaultCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRestartCodePackageFaultCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRestartCodePackageFaultCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + serviceManifestName: { + required: true, + serializedName: 'ServiceManifestName', + type: { + name: 'String' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRestartCodePackageFaultCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultScheduledEvent.js new file mode 100644 index 0000000000..664acfa537 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRestartCodePackageFaultScheduledEvent.js @@ -0,0 +1,138 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Code Package Fault Scheduled event. + * + * @extends models['ApplicationEvent'] + */ +class ChaosRestartCodePackageFaultScheduledEvent extends models['ApplicationEvent'] { + /** + * Create a ChaosRestartCodePackageFaultScheduledEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} serviceManifestName Service manifest name. + * @member {string} codePackageName Code package name. + * @member {string} servicePackageActivationId Id of Service package + * activation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRestartCodePackageFaultScheduledEvent + * + * @returns {object} metadata of ChaosRestartCodePackageFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRestartCodePackageFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRestartCodePackageFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + serviceManifestName: { + required: true, + serializedName: 'ServiceManifestName', + type: { + name: 'String' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRestartCodePackageFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultCompletedEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultCompletedEvent.js new file mode 100644 index 0000000000..127f7bd434 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultCompletedEvent.js @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Node Fault Completed event. + * + * @extends models['NodeEvent'] + */ +class ChaosRestartNodeFaultCompletedEvent extends models['NodeEvent'] { + /** + * Create a ChaosRestartNodeFaultCompletedEvent. + * @member {number} nodeInstanceId Id of Node instance. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRestartNodeFaultCompletedEvent + * + * @returns {object} metadata of ChaosRestartNodeFaultCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRestartNodeFaultCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRestartNodeFaultCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRestartNodeFaultCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultScheduledEvent.js new file mode 100644 index 0000000000..9b21ffa387 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRestartNodeFaultScheduledEvent.js @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Node Fault Scheduled event. + * + * @extends models['NodeEvent'] + */ +class ChaosRestartNodeFaultScheduledEvent extends models['NodeEvent'] { + /** + * Create a ChaosRestartNodeFaultScheduledEvent. + * @member {number} nodeInstanceId Id of Node instance. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRestartNodeFaultScheduledEvent + * + * @returns {object} metadata of ChaosRestartNodeFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRestartNodeFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRestartNodeFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRestartNodeFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js new file mode 100644 index 0000000000..e154807476 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js @@ -0,0 +1,120 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Restart Replica Fault Scheduled event. + * + * @extends models['ReplicaEvent'] + */ +class ChaosRestartReplicaFaultScheduledEvent extends models['ReplicaEvent'] { + /** + * Create a ChaosRestartReplicaFaultScheduledEvent. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosRestartReplicaFaultScheduledEvent + * + * @returns {object} metadata of ChaosRestartReplicaFaultScheduledEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosRestartReplicaFaultScheduled', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosRestartReplicaFaultScheduledEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + faultGroupId: { + required: true, + serializedName: 'FaultGroupId', + type: { + name: 'String' + } + }, + faultId: { + required: true, + serializedName: 'FaultId', + type: { + name: 'String' + } + }, + serviceUri: { + required: true, + serializedName: 'ServiceUri', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosRestartReplicaFaultScheduledEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosSchedule.js b/lib/services/serviceFabric/lib/models/chaosSchedule.js new file mode 100644 index 0000000000..34218305a4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosSchedule.js @@ -0,0 +1,102 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines the schedule used by Chaos. + * + */ +class ChaosSchedule { + /** + * Create a ChaosSchedule. + * @member {date} [startDate] The date and time Chaos will start using this + * schedule. + * . Default value: new Date('1601-01-01T00:00:00Z') . + * @member {date} [expiryDate] The date and time Chaos will continue to use + * this schedule until. + * . Default value: new Date('9999-12-31T23:59:59.999Z') . + * @member {array} [chaosParametersDictionary] A mapping of string names to + * Chaos Parameters to be referenced by Chaos Schedule Jobs. + * @member {array} [jobs] A list of all Chaos Schedule Jobs that will be + * automated by the schedule. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosSchedule + * + * @returns {object} metadata of ChaosSchedule + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosSchedule', + type: { + name: 'Composite', + className: 'ChaosSchedule', + modelProperties: { + startDate: { + required: false, + serializedName: 'StartDate', + defaultValue: new Date('1601-01-01T00:00:00Z'), + type: { + name: 'DateTime' + } + }, + expiryDate: { + required: false, + serializedName: 'ExpiryDate', + defaultValue: new Date('9999-12-31T23:59:59.999Z'), + type: { + name: 'DateTime' + } + }, + chaosParametersDictionary: { + required: false, + serializedName: 'ChaosParametersDictionary', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ChaosParametersDictionaryItemElementType', + type: { + name: 'Composite', + className: 'ChaosParametersDictionaryItem' + } + } + } + }, + jobs: { + required: false, + serializedName: 'Jobs', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ChaosScheduleJobElementType', + type: { + name: 'Composite', + className: 'ChaosScheduleJob' + } + } + } + } + } + } + }; + } +} + +module.exports = ChaosSchedule; diff --git a/lib/services/serviceFabric/lib/models/chaosScheduleDescription.js b/lib/services/serviceFabric/lib/models/chaosScheduleDescription.js new file mode 100644 index 0000000000..d90f25e8b0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosScheduleDescription.js @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class ChaosScheduleDescription { + /** + * Create a ChaosScheduleDescription. + * @member {number} [version] The version number of the Schedule. + * @member {object} [schedule] Defines the schedule used by Chaos. + * @member {date} [schedule.startDate] The date and time Chaos will start + * using this schedule. + * @member {date} [schedule.expiryDate] The date and time Chaos will continue + * to use this schedule until. + * @member {array} [schedule.chaosParametersDictionary] A mapping of string + * names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * @member {array} [schedule.jobs] A list of all Chaos Schedule Jobs that + * will be automated by the schedule. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosScheduleDescription + * + * @returns {object} metadata of ChaosScheduleDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosScheduleDescription', + type: { + name: 'Composite', + className: 'ChaosScheduleDescription', + modelProperties: { + version: { + required: false, + serializedName: 'Version', + constraints: { + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + schedule: { + required: false, + serializedName: 'Schedule', + type: { + name: 'Composite', + className: 'ChaosSchedule' + } + } + } + } + }; + } +} + +module.exports = ChaosScheduleDescription; diff --git a/lib/services/serviceFabric/lib/models/chaosScheduleJob.js b/lib/services/serviceFabric/lib/models/chaosScheduleJob.js new file mode 100644 index 0000000000..578a02096f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosScheduleJob.js @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a repetition rule and parameters of Chaos to be used with the Chaos + * Schedule. + * + */ +class ChaosScheduleJob { + /** + * Create a ChaosScheduleJob. + * @member {string} [chaosParameters] A reference to which Chaos Parameters + * of the Chaos Schedule to use. + * @member {object} [days] Defines the days of the week that a Chaos Schedule + * Job will run for. + * @member {boolean} [days.sunday] Indicates if the Chaos Schedule Job will + * run on Sunday + * @member {boolean} [days.monday] Indicates if the Chaos Schedule Job will + * run on Monday + * @member {boolean} [days.tuesday] Indicates if the Chaos Schedule Job will + * run on Tuesday + * @member {boolean} [days.wednesday] Indicates if the Chaos Schedule Job + * will run on Wednesday + * @member {boolean} [days.thursday] Indicates if the Chaos Schedule Job will + * run on Thursday + * @member {boolean} [days.friday] Indicates if the Chaos Schedule Job will + * run on Friday + * @member {boolean} [days.saturday] Indicates if the Chaos Schedule Job will + * run on Saturday + * @member {array} [times] A list of Time Ranges that specify when during + * active days that this job will run. The times are interpreted as UTC. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosScheduleJob + * + * @returns {object} metadata of ChaosScheduleJob + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosScheduleJob', + type: { + name: 'Composite', + className: 'ChaosScheduleJob', + modelProperties: { + chaosParameters: { + required: false, + serializedName: 'ChaosParameters', + type: { + name: 'String' + } + }, + days: { + required: false, + serializedName: 'Days', + type: { + name: 'Composite', + className: 'ChaosScheduleJobActiveDaysOfWeek' + } + }, + times: { + required: false, + serializedName: 'Times', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'TimeRangeElementType', + type: { + name: 'Composite', + className: 'TimeRange' + } + } + } + } + } + } + }; + } +} + +module.exports = ChaosScheduleJob; diff --git a/lib/services/serviceFabric/lib/models/chaosScheduleJobActiveDaysOfWeek.js b/lib/services/serviceFabric/lib/models/chaosScheduleJobActiveDaysOfWeek.js new file mode 100644 index 0000000000..2fe33932e9 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosScheduleJobActiveDaysOfWeek.js @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines the days of the week that a Chaos Schedule Job will run for. + * + */ +class ChaosScheduleJobActiveDaysOfWeek { + /** + * Create a ChaosScheduleJobActiveDaysOfWeek. + * @member {boolean} [sunday] Indicates if the Chaos Schedule Job will run on + * Sunday. Default value: false . + * @member {boolean} [monday] Indicates if the Chaos Schedule Job will run on + * Monday. Default value: false . + * @member {boolean} [tuesday] Indicates if the Chaos Schedule Job will run + * on Tuesday. Default value: false . + * @member {boolean} [wednesday] Indicates if the Chaos Schedule Job will run + * on Wednesday. Default value: false . + * @member {boolean} [thursday] Indicates if the Chaos Schedule Job will run + * on Thursday. Default value: false . + * @member {boolean} [friday] Indicates if the Chaos Schedule Job will run on + * Friday. Default value: false . + * @member {boolean} [saturday] Indicates if the Chaos Schedule Job will run + * on Saturday. Default value: false . + */ + constructor() { + } + + /** + * Defines the metadata of ChaosScheduleJobActiveDaysOfWeek + * + * @returns {object} metadata of ChaosScheduleJobActiveDaysOfWeek + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosScheduleJobActiveDaysOfWeek', + type: { + name: 'Composite', + className: 'ChaosScheduleJobActiveDaysOfWeek', + modelProperties: { + sunday: { + required: false, + serializedName: 'Sunday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + monday: { + required: false, + serializedName: 'Monday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + tuesday: { + required: false, + serializedName: 'Tuesday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + wednesday: { + required: false, + serializedName: 'Wednesday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + thursday: { + required: false, + serializedName: 'Thursday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + friday: { + required: false, + serializedName: 'Friday', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + saturday: { + required: false, + serializedName: 'Saturday', + defaultValue: false, + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ChaosScheduleJobActiveDaysOfWeek; diff --git a/lib/services/serviceFabric/lib/models/chaosStartedEvent.js b/lib/services/serviceFabric/lib/models/chaosStartedEvent.js new file mode 100644 index 0000000000..261533277b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosStartedEvent.js @@ -0,0 +1,166 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Started event. + * + * @extends models['ClusterEvent'] + */ +class ChaosStartedEvent extends models['ClusterEvent'] { + /** + * Create a ChaosStartedEvent. + * @member {number} maxConcurrentFaults Maximum number of concurrent faults. + * @member {number} timeToRunInSeconds Time to run in seconds. + * @member {number} maxClusterStabilizationTimeoutInSeconds Maximum timeout + * for cluster stabilization in seconds. + * @member {number} waitTimeBetweenIterationsInSeconds Wait time between + * iterations in seconds. + * @member {number} waitTimeBetweenFautlsInSeconds Wait time between faults + * in seconds. + * @member {boolean} moveReplicaFaultEnabled Indicates MoveReplica fault is + * enabled. + * @member {string} includedNodeTypeList List of included Node types. + * @member {string} includedApplicationList List of included Applications. + * @member {string} clusterHealthPolicy Health policy. + * @member {string} chaosContext Chaos Context. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosStartedEvent + * + * @returns {object} metadata of ChaosStartedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosStarted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosStartedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + maxConcurrentFaults: { + required: true, + serializedName: 'MaxConcurrentFaults', + type: { + name: 'Number' + } + }, + timeToRunInSeconds: { + required: true, + serializedName: 'TimeToRunInSeconds', + type: { + name: 'Number' + } + }, + maxClusterStabilizationTimeoutInSeconds: { + required: true, + serializedName: 'MaxClusterStabilizationTimeoutInSeconds', + type: { + name: 'Number' + } + }, + waitTimeBetweenIterationsInSeconds: { + required: true, + serializedName: 'WaitTimeBetweenIterationsInSeconds', + type: { + name: 'Number' + } + }, + waitTimeBetweenFautlsInSeconds: { + required: true, + serializedName: 'WaitTimeBetweenFautlsInSeconds', + type: { + name: 'Number' + } + }, + moveReplicaFaultEnabled: { + required: true, + serializedName: 'MoveReplicaFaultEnabled', + type: { + name: 'Boolean' + } + }, + includedNodeTypeList: { + required: true, + serializedName: 'IncludedNodeTypeList', + type: { + name: 'String' + } + }, + includedApplicationList: { + required: true, + serializedName: 'IncludedApplicationList', + type: { + name: 'String' + } + }, + clusterHealthPolicy: { + required: true, + serializedName: 'ClusterHealthPolicy', + type: { + name: 'String' + } + }, + chaosContext: { + required: true, + serializedName: 'ChaosContext', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosStartedEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js b/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js new file mode 100644 index 0000000000..0d8f89b95c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosStoppedEvent.js @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Chaos Stopped event. + * + * @extends models['ClusterEvent'] + */ +class ChaosStoppedEvent extends models['ClusterEvent'] { + /** + * Create a ChaosStoppedEvent. + * @member {string} reason Describes reason. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ChaosStoppedEvent + * + * @returns {object} metadata of ChaosStoppedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosStopped', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ChaosStoppedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + reason: { + required: true, + serializedName: 'Reason', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ChaosStoppedEvent; diff --git a/lib/services/serviceFabric/lib/models/chaosTargetFilter.js b/lib/services/serviceFabric/lib/models/chaosTargetFilter.js new file mode 100644 index 0000000000..0ce5f29fdf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/chaosTargetFilter.js @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * 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. + * + * + */ +class ChaosTargetFilter { + /** + * Create a ChaosTargetFilter. + * @member {array} [nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [applicationInclusionList] A list of application URI's 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. + */ + constructor() { + } + + /** + * Defines the metadata of ChaosTargetFilter + * + * @returns {object} metadata of ChaosTargetFilter + * + */ + mapper() { + return { + required: false, + serializedName: 'ChaosTargetFilter', + type: { + name: 'Composite', + className: 'ChaosTargetFilter', + modelProperties: { + nodeTypeInclusionList: { + required: false, + serializedName: 'NodeTypeInclusionList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + applicationInclusionList: { + required: false, + serializedName: 'ApplicationInclusionList', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = ChaosTargetFilter; diff --git a/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js new file mode 100644 index 0000000000..babdcb4571 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class CheckExistsPropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a CheckExistsPropertyBatchOperation. + * @member {boolean} exists Whether or not the property should exist for the + * operation to pass. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CheckExistsPropertyBatchOperation + * + * @returns {object} metadata of CheckExistsPropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'CheckExists', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'CheckExistsPropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + exists: { + required: true, + serializedName: 'Exists', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = CheckExistsPropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js new file mode 100644 index 0000000000..88720aa606 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class CheckSequencePropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a CheckSequencePropertyBatchOperation. + * @member {string} sequenceNumber The expected sequence number. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CheckSequencePropertyBatchOperation + * + * @returns {object} metadata of CheckSequencePropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'CheckSequence', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'CheckSequencePropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = CheckSequencePropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js new file mode 100644 index 0000000000..43ee0f4884 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class CheckValuePropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a CheckValuePropertyBatchOperation. + * @member {object} value The expected property value. + * @member {string} [value.kind] Polymorphic Discriminator + */ + constructor() { + super(); + } + + /** + * Defines the metadata of CheckValuePropertyBatchOperation + * + * @returns {object} metadata of CheckValuePropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'CheckValue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'CheckValuePropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'Value', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'PropertyValue' + } + } + } + } + }; + } +} + +module.exports = CheckValuePropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js index 34fa26dd65..ffd3109ec9 100644 --- a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeDescription.js @@ -9,7 +9,6 @@ */ 'use strict'; -var moment = require('moment'); /** * Describes the parameters for a standalone cluster configuration upgrade. diff --git a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeStatusInfo.js b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeStatusInfo.js index 0ccf71759b..aa0c5cc4f1 100644 --- a/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeStatusInfo.js +++ b/lib/services/serviceFabric/lib/models/clusterConfigurationUpgradeStatusInfo.js @@ -17,8 +17,9 @@ class ClusterConfigurationUpgradeStatusInfo { /** * Create a ClusterConfigurationUpgradeStatusInfo. - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', + * 'RollingBackCompleted', 'RollingForwardPending', * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' * @member {number} [progressStatus] The cluster manifest version. * @member {string} [configVersion] The cluster configuration version. diff --git a/lib/services/serviceFabric/lib/models/clusterEvent.js b/lib/services/serviceFabric/lib/models/clusterEvent.js new file mode 100644 index 0000000000..e5d5f1deb2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterEvent.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Cluster Events. + * + * @extends models['FabricEvent'] + */ +class ClusterEvent extends models['FabricEvent'] { + /** + * Create a ClusterEvent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterEvent + * + * @returns {object} metadata of ClusterEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ClusterEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterHealthChunk.js b/lib/services/serviceFabric/lib/models/clusterHealthChunk.js index d142aef17c..0419754c82 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthChunk.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthChunk.js @@ -22,12 +22,21 @@ const models = require('./index'); class ClusterHealthChunk { /** * Create a ClusterHealthChunk. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {object} [nodeHealthStateChunks] + * @member {string} [healthState] 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' + * @member {object} [nodeHealthStateChunks] The list of node health state + * chunks in the cluster that respect the filters in the cluster health chunk + * query description. * @member {array} [nodeHealthStateChunks.items] The list of node health * state chunks that respect the input filters in the chunk query. - * @member {object} [applicationHealthStateChunks] + * @member {object} [applicationHealthStateChunks] The list of application + * health state chunks in the cluster that respect the filters in the cluster + * health chunk query description. * @member {array} [applicationHealthStateChunks.items] The list of * application health state chunks that respect the input filters in the * chunk query. diff --git a/lib/services/serviceFabric/lib/models/clusterHealthChunkQueryDescription.js b/lib/services/serviceFabric/lib/models/clusterHealthChunkQueryDescription.js index c048b75f34..1812835bde 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthChunkQueryDescription.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthChunkQueryDescription.js @@ -40,7 +40,8 @@ class ClusterHealthChunkQueryDescription { * 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. - * @member {object} [clusterHealthPolicy] + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -75,8 +76,35 @@ class ClusterHealthChunkQueryDescription { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [applicationHealthPolicies] - * @member {array} [applicationHealthPolicies.applicationHealthPolicyMap] + * 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. + * @member {object} [applicationHealthPolicies] Defines the application + * health policy map used to evaluate the health of an application or one of + * its children entities. + * @member {array} [applicationHealthPolicies.applicationHealthPolicyMap] The + * wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/clusterHealthPolicies.js b/lib/services/serviceFabric/lib/models/clusterHealthPolicies.js index eb4357128d..ccf47ddc47 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthPolicies.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthPolicies.js @@ -19,8 +19,17 @@ const models = require('./index'); class ClusterHealthPolicies { /** * Create a ClusterHealthPolicies. - * @member {array} [applicationHealthPolicyMap] - * @member {object} [clusterHealthPolicy] + * @member {array} [applicationHealthPolicyMap] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -55,6 +64,29 @@ class ClusterHealthPolicies { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js b/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js index 6e47613e67..1f1382e6cc 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js @@ -55,7 +55,29 @@ class ClusterHealthPolicy { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * . Default value: 0 . - * @member {array} [applicationTypeHealthPolicyMap] + * @member {array} [applicationTypeHealthPolicyMap] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/clusterHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/clusterHealthReportCreatedEvent.js new file mode 100644 index 0000000000..9597ab33a9 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterHealthReportCreatedEvent.js @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Health Report Created event. + * + * @extends models['ClusterEvent'] + */ +class ClusterHealthReportCreatedEvent extends models['ClusterEvent'] { + /** + * Create a ClusterHealthReportCreatedEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterHealthReportCreatedEvent + * + * @returns {object} metadata of ClusterHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ClusterHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js new file mode 100644 index 0000000000..aa8a98e62e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterHealthReportExpiredEvent.js @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Health Report Expired event. + * + * @extends models['ClusterEvent'] + */ +class ClusterHealthReportExpiredEvent extends models['ClusterEvent'] { + /** + * Create a ClusterHealthReportExpiredEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterHealthReportExpiredEvent + * + * @returns {object} metadata of ClusterHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ClusterHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeCompleteEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeCompleteEvent.js new file mode 100644 index 0000000000..19a9233ff5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeCompleteEvent.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Complete event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeCompleteEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeCompleteEvent. + * @member {string} targetClusterVersion Target Cluster version. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeCompleteEvent + * + * @returns {object} metadata of ClusterUpgradeCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js b/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js index 72a408f4c5..c8afe33f93 100644 --- a/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js @@ -19,26 +19,70 @@ const models = require('./index'); class ClusterUpgradeDescriptionObject { /** * Create a ClusterUpgradeDescriptionObject. - * @member {string} [configVersion] - * @member {string} [codeVersion] - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} [configVersion] The cluster configuration version + * (specified in the cluster manifest). + * @member {string} [codeVersion] The ServiceFabric code version of the + * cluster. + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {boolean} [enableDeltaHealthEvaluation] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta + * health evaluation rather than absolute health evaluation after completion + * of each upgrade domain. + * @member {object} [monitoringPolicy] Describes the parameters for + * monitoring an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * [monitoringPolicy.healthCheckStableDurationInMilliseconds] 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -73,7 +117,31 @@ class ClusterUpgradeDescriptionObject { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [clusterUpgradeHealthPolicy] + * 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. + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} * [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] The maximum * allowed percentage of nodes health degradation allowed during cluster @@ -91,7 +159,15 @@ class ClusterUpgradeDescriptionObject { * 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%. - * @member {array} [applicationHealthPolicyMap] + * @member {array} [applicationHealthPolicyMap] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompleteEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompleteEvent.js new file mode 100644 index 0000000000..482594cc81 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeDomainCompleteEvent.js @@ -0,0 +1,115 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Domain Complete event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeDomainCompleteEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeDomainCompleteEvent. + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} upgradeState State of upgrade. + * @member {string} upgradeDomains Upgrade domains. + * @member {number} upgradeDomainElapsedTimeInMs Duration of domain upgrade + * in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeDomainCompleteEvent + * + * @returns {object} metadata of ClusterUpgradeDomainCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeDomainComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeDomainCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + upgradeState: { + required: true, + serializedName: 'UpgradeState', + type: { + name: 'String' + } + }, + upgradeDomains: { + required: true, + serializedName: 'UpgradeDomains', + type: { + name: 'String' + } + }, + upgradeDomainElapsedTimeInMs: { + required: true, + serializedName: 'UpgradeDomainElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeDomainCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js b/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js index 161d5b164a..2b25bea060 100644 --- a/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js @@ -19,41 +19,94 @@ const models = require('./index'); class ClusterUpgradeProgressObject { /** * Create a ClusterUpgradeProgressObject. - * @member {string} [codeVersion] - * @member {string} [configVersion] - * @member {array} [upgradeDomains] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', + * @member {string} [codeVersion] The ServiceFabric code version of the + * cluster. + * @member {string} [configVersion] The cluster configuration version + * (specified in the cluster manifest). + * @member {array} [upgradeDomains] List of upgrade domains and their + * statuses. + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', + * 'RollingBackCompleted', 'RollingForwardPending', * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' - * @member {string} [nextUpgradeDomain] - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} [nextUpgradeDomain] The name of the next upgrade domain + * to be processed. + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {object} [upgradeDescription] - * @member {string} [upgradeDescription.configVersion] - * @member {string} [upgradeDescription.codeVersion] - * @member {string} [upgradeDescription.upgradeKind] Possible values include: - * 'Invalid', 'Rolling' - * @member {string} [upgradeDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {object} [upgradeDescription] Represents a ServiceFabric cluster + * upgrade + * @member {string} [upgradeDescription.configVersion] The cluster + * configuration version (specified in the cluster manifest). + * @member {string} [upgradeDescription.codeVersion] The ServiceFabric code + * version of the cluster. + * @member {string} [upgradeDescription.upgradeKind] The kind of upgrade out + * of the following possible values. Possible values include: 'Invalid', + * 'Rolling' + * @member {string} [upgradeDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * @member {number} - * [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [upgradeDescription.forceRestart] - * @member {boolean} [upgradeDescription.enableDeltaHealthEvaluation] - * @member {object} [upgradeDescription.monitoringPolicy] - * @member {string} [upgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [upgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * @member {boolean} [upgradeDescription.enableDeltaHealthEvaluation] When + * true, enables delta health evaluation rather than absolute health + * evaluation after completion of each upgrade domain. + * @member {object} [upgradeDescription.monitoringPolicy] Describes the + * parameters for monitoring an upgrade in Monitored mode. + * @member {string} [upgradeDescription.monitoringPolicy.failureAction] 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' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] 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. * @member {string} * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [upgradeDescription.clusterHealthPolicy] + * 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. + * @member {object} [upgradeDescription.clusterHealthPolicy] Defines a health + * policy used to evaluate the health of the cluster or of a cluster node. * @member {boolean} * [upgradeDescription.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -92,7 +145,32 @@ class ClusterUpgradeProgressObject { * applications. Default percentage is zero. * @member {array} * [upgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [upgradeDescription.clusterUpgradeHealthPolicy] + * 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. + * @member {object} [upgradeDescription.clusterUpgradeHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster during a cluster + * upgrade. * @member {number} * [upgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] * The maximum allowed percentage of nodes health degradation allowed during @@ -110,20 +188,41 @@ class ClusterUpgradeProgressObject { * 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%. - * @member {array} [upgradeDescription.applicationHealthPolicyMap] - * @member {string} [upgradeDurationInMilliseconds] - * @member {string} [upgradeDomainDurationInMilliseconds] - * @member {array} [unhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] + * @member {array} [upgradeDescription.applicationHealthPolicyMap] 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. + * @member {string} [upgradeDurationInMilliseconds] The estimated elapsed + * time spent processing the current overall upgrade. + * @member {string} [upgradeDomainDurationInMilliseconds] The estimated + * elapsed time spent processing the current upgrade domain. + * @member {array} [unhealthyEvaluations] List of health evaluations that + * resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] - * @member {string} [startTimestampUtc] - * @member {string} [failureTimestampUtc] - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * List of upgrading nodes and their statuses + * @member {string} [startTimestampUtc] The start time of the upgrade in UTC. + * @member {string} [failureTimestampUtc] The failure time of the upgrade in + * UTC. + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] The detailed upgrade + * progress for nodes in the current upgrade domain at the point of failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of + * the upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] + * List of upgrading nodes and their statuses */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompleteEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompleteEvent.js new file mode 100644 index 0000000000..17a02a44c8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackCompleteEvent.js @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Rollback Complete event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeRollbackCompleteEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeRollbackCompleteEvent. + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} failureReason Describes failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeRollbackCompleteEvent + * + * @returns {object} metadata of ClusterUpgradeRollbackCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeRollbackComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeRollbackCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeRollbackCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartEvent.js new file mode 100644 index 0000000000..780d100402 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeRollbackStartEvent.js @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Rollback Start event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeRollbackStartEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeRollbackStartEvent. + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} failureReason Describes failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeRollbackStartEvent + * + * @returns {object} metadata of ClusterUpgradeRollbackStartEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeRollbackStart', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeRollbackStartEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + failureReason: { + required: true, + serializedName: 'FailureReason', + type: { + name: 'String' + } + }, + overallUpgradeElapsedTimeInMs: { + required: true, + serializedName: 'OverallUpgradeElapsedTimeInMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeRollbackStartEvent; diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeStartEvent.js b/lib/services/serviceFabric/lib/models/clusterUpgradeStartEvent.js new file mode 100644 index 0000000000..0dc43c4998 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeStartEvent.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Cluster Upgrade Start event. + * + * @extends models['ClusterEvent'] + */ +class ClusterUpgradeStartEvent extends models['ClusterEvent'] { + /** + * Create a ClusterUpgradeStartEvent. + * @member {string} currentClusterVersion Current Cluster version. + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} upgradeType Type of upgrade. + * @member {string} rollingUpgradeMode Mode of upgrade. + * @member {string} failureAction Action if failed. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ClusterUpgradeStartEvent + * + * @returns {object} metadata of ClusterUpgradeStartEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ClusterUpgradeStart', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterUpgradeStartEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + currentClusterVersion: { + required: true, + serializedName: 'CurrentClusterVersion', + type: { + name: 'String' + } + }, + targetClusterVersion: { + required: true, + serializedName: 'TargetClusterVersion', + type: { + name: 'String' + } + }, + upgradeType: { + required: true, + serializedName: 'UpgradeType', + type: { + name: 'String' + } + }, + rollingUpgradeMode: { + required: true, + serializedName: 'RollingUpgradeMode', + type: { + name: 'String' + } + }, + failureAction: { + required: true, + serializedName: 'FailureAction', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ClusterUpgradeStartEvent; diff --git a/lib/services/serviceFabric/lib/models/codePackageEntryPoint.js b/lib/services/serviceFabric/lib/models/codePackageEntryPoint.js index ad91c3880e..29240c55d9 100644 --- a/lib/services/serviceFabric/lib/models/codePackageEntryPoint.js +++ b/lib/services/serviceFabric/lib/models/codePackageEntryPoint.js @@ -22,10 +22,11 @@ class CodePackageEntryPoint { * Create a CodePackageEntryPoint. * @member {string} [entryPointLocation] The location of entry point * executable on the node. - * @member {string} [processId] The process id of the entry point. + * @member {string} [processId] The process ID of the entry point. * @member {string} [runAsUserName] The user name under which entry point * executable is run on the node. - * @member {object} [codePackageEntryPointStatistics] + * @member {object} [codePackageEntryPointStatistics] Statistics about setup + * or main entry point of a code package deployed on a Service Fabric node. * @member {string} [codePackageEntryPointStatistics.lastExitCode] The last * exit code of the entry point. * @member {date} [codePackageEntryPointStatistics.lastActivationTime] The @@ -51,11 +52,15 @@ class CodePackageEntryPoint { * @member {string} * [codePackageEntryPointStatistics.continuousExitFailureCount] Number of * times the entry point continuously failed to exit gracefully. - * @member {string} [status] Possible values include: 'Invalid', 'Pending', - * 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [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' * @member {date} [nextActivationTime] The time (in UTC) when the entry point * executable will be run next. - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentStatusInfo.js b/lib/services/serviceFabric/lib/models/composeDeploymentStatusInfo.js index 97d89a7923..15bff68c8b 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentStatusInfo.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentStatusInfo.js @@ -17,11 +17,12 @@ class ComposeDeploymentStatusInfo { /** * Create a ComposeDeploymentStatusInfo. - * @member {string} [name] - * @member {string} [applicationName] - * @member {string} [status] Possible values include: 'Invalid', - * 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', 'Deleting', - * 'Failed', 'Upgrading' + * @member {string} [name] The name of the deployment. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [status] The status of the compose deployment. Possible + * values include: 'Invalid', 'Provisioning', 'Creating', 'Ready', + * 'Unprovisioning', 'Deleting', 'Failed', 'Upgrading' * @member {string} [statusDetails] The status details of compose deployment * including failure message. */ diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js index c0007bc739..b01b415b91 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js @@ -19,33 +19,74 @@ const models = require('./index'); class ComposeDeploymentUpgradeDescription { /** * Create a ComposeDeploymentUpgradeDescription. - * @member {string} deploymentName + * @member {string} deploymentName The name of the deployment. * @member {string} composeFileContent The content of the compose file that * describes the deployment to create. - * @member {object} [registryCredential] + * @member {object} [registryCredential] Credential information to connect to + * container registry. * @member {string} [registryCredential.registryUserName] The user name to * connect to container registry. * @member {string} [registryCredential.registryPassword] The password for * supplied username to connect to container registry. * @member {boolean} [registryCredential.passwordEncrypted] Indicates that * supplied container registry password is encrypted. - * @member {string} upgradeKind Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for + * monitoring an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * [monitoringPolicy.healthCheckStableDurationInMilliseconds] 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @member {number} @@ -61,6 +102,8 @@ class ComposeDeploymentUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service + * type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -101,7 +144,9 @@ class ComposeDeploymentUpgradeDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The + * map with service type health policy per service type name. The map is + * empty by default. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js index 247ac90284..d63d616ad9 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js @@ -19,31 +19,75 @@ const models = require('./index'); class ComposeDeploymentUpgradeProgressInfo { /** * Create a ComposeDeploymentUpgradeProgressInfo. - * @member {string} [deploymentName] - * @member {string} [applicationName] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'ProvisioningTarget', 'RollingForwardInProgress', 'RollingForwardPending', + * @member {string} [deploymentName] The name of the target deployment. + * @member {string} [applicationName] The name of the target application, + * including the 'fabric:' URI scheme. + * @member {string} [upgradeState] The state of the compose deployment + * upgrade. + * . Possible values include: 'Invalid', 'ProvisioningTarget', + * 'RollingForwardInProgress', 'RollingForwardPending', * 'UnprovisioningCurrent', 'RollingForwardCompleted', * 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', * 'Failed' - * @member {string} [upgradeStatusDetails] - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} [upgradeStatusDetails] Additional detailed information + * about the status of the pending upgrade. + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {boolean} [forceRestart] - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {object} [monitoringPolicy] Describes the parameters for + * monitoring an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * [monitoringPolicy.healthCheckStableDurationInMilliseconds] 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @member {number} @@ -59,6 +103,8 @@ class ComposeDeploymentUpgradeProgressInfo { * The computation rounds up to tolerate one failure on small numbers of * nodes. Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service + * type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. @@ -99,22 +145,44 @@ class ComposeDeploymentUpgradeProgressInfo { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] - * @member {string} [targetApplicationTypeVersion] - * @member {string} [upgradeDuration] - * @member {string} [currentUpgradeDomainDuration] - * @member {array} [applicationUnhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The + * map with service type health policy per service type name. The map is + * empty by default. + * @member {string} [targetApplicationTypeVersion] The target application + * type version (found in the application manifest) for the application + * upgrade. + * @member {string} [upgradeDuration] 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. + * @member {string} [currentUpgradeDomainDuration] 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. + * @member {array} [applicationUnhealthyEvaluations] List of health + * evaluations that resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] - * @member {string} [startTimestampUtc] - * @member {string} [failureTimestampUtc] - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * List of upgrading nodes and their statuses + * @member {string} [startTimestampUtc] The estimated UTC datetime when the + * upgrade started. + * @member {string} [failureTimestampUtc] The estimated UTC datetime when the + * upgrade failed and FailureAction was executed. + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] Information about the + * upgrade domain progress at the time of upgrade failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of + * the upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] - * @member {string} [applicationUpgradeStatusDetails] + * List of upgrading nodes and their statuses + * @member {string} [applicationUpgradeStatusDetails] Additional details of + * application upgrade including failure message. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/containerApiRequestBody.js b/lib/services/serviceFabric/lib/models/containerApiRequestBody.js new file mode 100644 index 0000000000..501c4398a5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerApiRequestBody.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * parameters for making container API call. + * + */ +class ContainerApiRequestBody { + /** + * Create a ContainerApiRequestBody. + * @member {string} [httpVerb] HTTP verb of container REST API, defaults to + * "GET" + * @member {string} uriPath URI path of container REST API + * @member {string} [contentType] Content type of container REST API request, + * defaults to "application/json" + * @member {string} [body] HTTP request body of container REST API + */ + constructor() { + } + + /** + * Defines the metadata of ContainerApiRequestBody + * + * @returns {object} metadata of ContainerApiRequestBody + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerApiRequestBody', + type: { + name: 'Composite', + className: 'ContainerApiRequestBody', + modelProperties: { + httpVerb: { + required: false, + serializedName: 'HttpVerb', + type: { + name: 'String' + } + }, + uriPath: { + required: true, + serializedName: 'UriPath', + type: { + name: 'String' + } + }, + contentType: { + required: false, + serializedName: 'Content-Type', + type: { + name: 'String' + } + }, + body: { + required: false, + serializedName: 'Body', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ContainerApiRequestBody; diff --git a/lib/services/serviceFabric/lib/models/containerApiResponse.js b/lib/services/serviceFabric/lib/models/containerApiResponse.js new file mode 100644 index 0000000000..e97140d20b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerApiResponse.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Response body that wraps container API result. + * + */ +class ContainerApiResponse { + /** + * Create a ContainerApiResponse. + * @member {object} containerApiResult Container API result. + * @member {number} [containerApiResult.status] HTTP status code returned by + * the target container API + * @member {string} [containerApiResult.contentType] HTTP content type + * @member {string} [containerApiResult.contentEncoding] HTTP content + * encoding + * @member {string} [containerApiResult.body] container API result body + */ + constructor() { + } + + /** + * Defines the metadata of ContainerApiResponse + * + * @returns {object} metadata of ContainerApiResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerApiResponse', + type: { + name: 'Composite', + className: 'ContainerApiResponse', + modelProperties: { + containerApiResult: { + required: true, + serializedName: 'ContainerApiResult', + type: { + name: 'Composite', + className: 'ContainerApiResult' + } + } + } + } + }; + } +} + +module.exports = ContainerApiResponse; diff --git a/lib/services/serviceFabric/lib/models/containerApiResult.js b/lib/services/serviceFabric/lib/models/containerApiResult.js new file mode 100644 index 0000000000..5099b215bf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerApiResult.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Container API result. + * + */ +class ContainerApiResult { + /** + * Create a ContainerApiResult. + * @member {number} status HTTP status code returned by the target container + * API + * @member {string} [contentType] HTTP content type + * @member {string} [contentEncoding] HTTP content encoding + * @member {string} [body] container API result body + */ + constructor() { + } + + /** + * Defines the metadata of ContainerApiResult + * + * @returns {object} metadata of ContainerApiResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerApiResult', + type: { + name: 'Composite', + className: 'ContainerApiResult', + modelProperties: { + status: { + required: true, + serializedName: 'Status', + type: { + name: 'Number' + } + }, + contentType: { + required: false, + serializedName: 'Content-Type', + type: { + name: 'String' + } + }, + contentEncoding: { + required: false, + serializedName: 'Content-Encoding', + type: { + name: 'String' + } + }, + body: { + required: false, + serializedName: 'Body', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ContainerApiResult; diff --git a/lib/services/serviceFabric/lib/models/containerDeactivatedEvent.js b/lib/services/serviceFabric/lib/models/containerDeactivatedEvent.js new file mode 100644 index 0000000000..c6897eab49 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerDeactivatedEvent.js @@ -0,0 +1,187 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Container Deactivated event. + * + * @extends models['ApplicationEvent'] + */ +class ContainerDeactivatedEvent extends models['ApplicationEvent'] { + /** + * Create a ContainerDeactivatedEvent. + * @member {string} serviceName Name of Service. + * @member {string} servicePackageName Name of Service package. + * @member {string} servicePackageActivationId Activation Id of Service + * package. + * @member {boolean} isExclusive Indicates IsExclusive flag. + * @member {string} codePackageName Name of Code package. + * @member {string} entryPointType Type of EntryPoint. + * @member {string} imageName Name of Container image. + * @member {string} containerName Name of Container. + * @member {string} hostId Host Id. + * @member {number} exitCode Exit code of process. + * @member {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @member {date} startTime Start time of process. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ContainerDeactivatedEvent + * + * @returns {object} metadata of ContainerDeactivatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerDeactivated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ContainerDeactivatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + servicePackageName: { + required: true, + serializedName: 'ServicePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + isExclusive: { + required: true, + serializedName: 'IsExclusive', + type: { + name: 'Boolean' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + entryPointType: { + required: true, + serializedName: 'EntryPointType', + type: { + name: 'String' + } + }, + imageName: { + required: true, + serializedName: 'ImageName', + type: { + name: 'String' + } + }, + containerName: { + required: true, + serializedName: 'ContainerName', + type: { + name: 'String' + } + }, + hostId: { + required: true, + serializedName: 'HostId', + type: { + name: 'String' + } + }, + exitCode: { + required: true, + serializedName: 'ExitCode', + type: { + name: 'Number' + } + }, + unexpectedTermination: { + required: true, + serializedName: 'UnexpectedTermination', + type: { + name: 'Boolean' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ContainerDeactivatedEvent; diff --git a/lib/services/serviceFabric/lib/models/containerInstanceEvent.js b/lib/services/serviceFabric/lib/models/containerInstanceEvent.js new file mode 100644 index 0000000000..9cf71318ce --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerInstanceEvent.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Container Events. + * + * @extends models['FabricEvent'] + */ +class ContainerInstanceEvent extends models['FabricEvent'] { + /** + * Create a ContainerInstanceEvent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ContainerInstanceEvent + * + * @returns {object} metadata of ContainerInstanceEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerInstanceEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ContainerInstanceEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ContainerInstanceEvent; diff --git a/lib/services/serviceFabric/lib/models/containerLogs.js b/lib/services/serviceFabric/lib/models/containerLogs.js new file mode 100644 index 0000000000..d6285b54d5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/containerLogs.js @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Container logs. + * + */ +class ContainerLogs { + /** + * Create a ContainerLogs. + * @member {string} [content] Container logs. + */ + constructor() { + } + + /** + * Defines the metadata of ContainerLogs + * + * @returns {object} metadata of ContainerLogs + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerLogs', + type: { + name: 'Composite', + className: 'ContainerLogs', + modelProperties: { + content: { + required: false, + serializedName: 'Content', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ContainerLogs; diff --git a/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js b/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js index af0583ae49..8692d3e676 100644 --- a/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js +++ b/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js @@ -20,10 +20,11 @@ const models = require('./index'); class CreateComposeDeploymentDescription { /** * Create a CreateComposeDeploymentDescription. - * @member {string} deploymentName + * @member {string} deploymentName The name of the deployment. * @member {string} composeFileContent The content of the compose file that * describes the deployment to create. - * @member {object} [registryCredential] + * @member {object} [registryCredential] Credential information to connect to + * container registry. * @member {string} [registryCredential.registryUserName] The user name to * connect to container registry. * @member {string} [registryCredential.registryPassword] The password for diff --git a/lib/services/serviceFabric/lib/models/currentUpgradeDomainProgressInfo.js b/lib/services/serviceFabric/lib/models/currentUpgradeDomainProgressInfo.js index 9d80ef50b8..886775afa4 100644 --- a/lib/services/serviceFabric/lib/models/currentUpgradeDomainProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/currentUpgradeDomainProgressInfo.js @@ -19,8 +19,9 @@ const models = require('./index'); class CurrentUpgradeDomainProgressInfo { /** * Create a CurrentUpgradeDomainProgressInfo. - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and + * their statuses */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js b/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js index f781eadf08..8f93d84d12 100644 --- a/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js +++ b/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js @@ -19,11 +19,6 @@ class DeactivationIntentDescription { * Create a DeactivationIntentDescription. * @member {string} [deactivationIntent] Describes the intent or reason for * deactivating the node. The possible values are following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted - * after a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. * . Possible values include: 'Pause', 'Restart', 'RemoveData' */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js new file mode 100644 index 0000000000..39c7cd485f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class DeletePropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a DeletePropertyBatchOperation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeletePropertyBatchOperation + * + * @returns {object} metadata of DeletePropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'Delete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'DeletePropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DeletePropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js index faf0623275..ed15e9acec 100644 --- a/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js @@ -32,7 +32,10 @@ class DeltaNodesCheckHealthEvaluation extends models['HealthEvaluation'] { * @member {number} [maxPercentDeltaUnhealthyNodes] Maximum allowed * percentage of delta unhealthy nodes from the ClusterUpgradeHealthPolicy. * @member {number} [totalCount] Total number of nodes in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. + * Includes all the unhealthy NodeHealthEvaluation that impacted the + * aggregated health. */ constructor() { super(); @@ -50,6 +53,11 @@ class DeltaNodesCheckHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'DeltaNodesCheck', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'DeltaNodesCheckHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -69,6 +77,7 @@ class DeltaNodesCheckHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js b/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js index 4d4c48059e..397c25189f 100644 --- a/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js +++ b/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js @@ -21,11 +21,15 @@ const models = require('./index'); class DeployServicePackageToNodeDescription { /** * Create a DeployServicePackageToNodeDescription. - * @member {string} serviceManifestName - * @member {string} applicationTypeName - * @member {string} applicationTypeVersion - * @member {string} nodeName - * @member {array} [packageSharingPolicy] + * @member {string} serviceManifestName The name of service manifest whose + * packages need to be downloaded. + * @member {string} applicationTypeName The application type name as defined + * in the application manifest. + * @member {string} applicationTypeVersion The version of the application + * type as defined in the application manifest. + * @member {string} nodeName The name of a Service Fabric node. + * @member {array} [packageSharingPolicy] List of package sharing policy + * information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealth.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealth.js index 06f02c57b4..1c46502156 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealth.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealth.js @@ -21,9 +21,13 @@ const models = require('./index'); class DeployedApplicationHealth extends models['EntityHealth'] { /** * Create a DeployedApplicationHealth. - * @member {string} [name] - * @member {string} [nodeName] - * @member {array} [deployedServicePackageHealthStates] + * @member {string} [name] Name of the application deployed on the node whose + * health information is described by this object. + * @member {string} [nodeName] Name of the node where this application is + * deployed. + * @member {array} [deployedServicePackageHealthStates] Deployed service + * package health states for the current deployed application as found in the + * health store. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js index e108140f4a..82860d2eca 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js @@ -23,9 +23,14 @@ const models = require('./index'); class DeployedApplicationHealthEvaluation extends models['HealthEvaluation'] { /** * Create a DeployedApplicationHealthEvaluation. - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] Name of the node where the application is + * deployed to. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -43,6 +48,11 @@ class DeployedApplicationHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'DeployedApplication', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'DeployedApplicationHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -62,6 +72,7 @@ class DeployedApplicationHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportCreatedEvent.js new file mode 100644 index 0000000000..9f4fcc0936 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportCreatedEvent.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Application Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedApplicationHealthReportCreatedEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedApplicationHealthReportCreatedEvent. + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedApplicationHealthReportCreatedEvent + * + * @returns {object} metadata of DeployedApplicationHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedApplicationHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedApplicationHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedApplicationHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js new file mode 100644 index 0000000000..86e7698dd6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthReportExpiredEvent.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Application Health Report Expired event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedApplicationHealthReportExpiredEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedApplicationHealthReportExpiredEvent. + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedApplicationHealthReportExpiredEvent + * + * @returns {object} metadata of DeployedApplicationHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedApplicationHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedApplicationHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + applicationInstanceId: { + required: true, + serializedName: 'ApplicationInstanceId', + type: { + name: 'Number' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedApplicationHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthState.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthState.js index 65091ef9b1..1fc9eea20e 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthState.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthState.js @@ -21,8 +21,10 @@ const models = require('./index'); class DeployedApplicationHealthState extends models['EntityHealthState'] { /** * Create a DeployedApplicationHealthState. - * @member {string} [nodeName] - * @member {string} [applicationName] + * @member {string} [nodeName] Name of the node on which the service package + * is deployed. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js index e2914387c9..a72f8e42a0 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js @@ -26,7 +26,10 @@ class DeployedApplicationHealthStateChunk extends models['EntityHealthStateChunk * Create a DeployedApplicationHealthStateChunk. * @member {string} [nodeName] The name of node where the application is * deployed. - * @member {object} [deployedServicePackageHealthStateChunks] + * @member {object} [deployedServicePackageHealthStateChunks] 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. * @member {array} [deployedServicePackageHealthStateChunks.items] The list * of deployed service package health state chunks that respect the input * filters in the chunk query. diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js b/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js index 6e218d800b..15790cc4e4 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js @@ -17,11 +17,21 @@ class DeployedApplicationInfo { /** * Create a DeployedApplicationInfo. - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [status] Possible values include: 'Invalid', - * 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + * @member {string} [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. + * @member {string} [name] The name of the application, including the + * 'fabric:' URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [status] The status of the application deployed on the + * node. Following are the possible values. + * . Possible values include: 'Invalid', 'Downloading', 'Activating', + * 'Active', 'Upgrading', 'Deactivating' * @member {string} [workDirectory] The work directory of the application on * the node. The work directory can be used to store application data. * @member {string} [logDirectory] The log directory of the application on @@ -29,6 +39,9 @@ class DeployedApplicationInfo { * @member {string} [tempDirectory] 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. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' */ constructor() { } @@ -95,6 +108,13 @@ class DeployedApplicationInfo { type: { name: 'String' } + }, + healthState: { + required: false, + serializedName: 'HealthState', + type: { + name: 'String' + } } } } diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js index 055c9ae35d..2ef3825c87 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js @@ -30,7 +30,9 @@ class DeployedApplicationsHealthEvaluation extends models['HealthEvaluation'] { * ApplicationHealthPolicy. * @member {number} [totalCount] Total number of deployed applications of the * application in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * DeployedApplicationHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -48,6 +50,11 @@ class DeployedApplicationsHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'DeployedApplications', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'DeployedApplicationsHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -67,6 +74,7 @@ class DeployedApplicationsHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js b/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js index 9e1a356352..e1f0d2dcad 100644 --- a/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js @@ -19,27 +19,42 @@ const models = require('./index'); class DeployedCodePackageInfo { /** * Create a DeployedCodePackageInfo. - * @member {string} [name] + * @member {string} [name] The name of the code package. * @member {string} [version] The version of the code package specified in * service manifest. - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] - * @member {string} [hostType] Possible values include: 'Invalid', 'ExeHost', - * 'ContainerHost' - * @member {string} [hostIsolationMode] Possible values include: 'None', + * @member {string} [serviceManifestName] The name of service manifest that + * specified this code package. + * @member {string} [servicePackageActivationId] 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. + * @member {string} [hostType] Specifies the type of host for main entry + * point of a code package as specified in service manifest. Possible values + * include: 'Invalid', 'ExeHost', 'ContainerHost' + * @member {string} [hostIsolationMode] 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' - * @member {string} [status] Possible values include: 'Invalid', - * 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' + * @member {string} [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' * @member {string} [runFrequencyInterval] The interval at which code package * is run. This is used for periodic code package. - * @member {object} [setupEntryPoint] + * @member {object} [setupEntryPoint] Information about setup or main entry + * point of a code package deployed on a Service Fabric node. * @member {string} [setupEntryPoint.entryPointLocation] The location of * entry point executable on the node. - * @member {string} [setupEntryPoint.processId] The process id of the entry + * @member {string} [setupEntryPoint.processId] The process ID of the entry * point. * @member {string} [setupEntryPoint.runAsUserName] The user name under which * entry point executable is run on the node. * @member {object} [setupEntryPoint.codePackageEntryPointStatistics] + * Statistics about setup or main entry point of a code package deployed on + * a Service Fabric node. * @member {string} * [setupEntryPoint.codePackageEntryPointStatistics.lastExitCode] The last * exit code of the entry point. @@ -73,19 +88,27 @@ class DeployedCodePackageInfo { * @member {string} * [setupEntryPoint.codePackageEntryPointStatistics.continuousExitFailureCount] * Number of times the entry point continuously failed to exit gracefully. - * @member {string} [setupEntryPoint.status] Possible values include: - * 'Invalid', 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [setupEntryPoint.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' * @member {date} [setupEntryPoint.nextActivationTime] The time (in UTC) when * the entry point executable will be run next. - * @member {string} [setupEntryPoint.instanceId] - * @member {object} [mainEntryPoint] + * @member {string} [setupEntryPoint.instanceId] 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. + * @member {object} [mainEntryPoint] Information about setup or main entry + * point of a code package deployed on a Service Fabric node. * @member {string} [mainEntryPoint.entryPointLocation] The location of entry * point executable on the node. - * @member {string} [mainEntryPoint.processId] The process id of the entry + * @member {string} [mainEntryPoint.processId] The process ID of the entry * point. * @member {string} [mainEntryPoint.runAsUserName] The user name under which * entry point executable is run on the node. * @member {object} [mainEntryPoint.codePackageEntryPointStatistics] + * Statistics about setup or main entry point of a code package deployed on + * a Service Fabric node. * @member {string} * [mainEntryPoint.codePackageEntryPointStatistics.lastExitCode] The last * exit code of the entry point. @@ -119,11 +142,16 @@ class DeployedCodePackageInfo { * @member {string} * [mainEntryPoint.codePackageEntryPointStatistics.continuousExitFailureCount] * Number of times the entry point continuously failed to exit gracefully. - * @member {string} [mainEntryPoint.status] Possible values include: - * 'Invalid', 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [mainEntryPoint.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' * @member {date} [mainEntryPoint.nextActivationTime] The time (in UTC) when * the entry point executable will be run next. - * @member {string} [mainEntryPoint.instanceId] + * @member {string} [mainEntryPoint.instanceId] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deployedServiceHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/deployedServiceHealthReportCreatedEvent.js new file mode 100644 index 0000000000..705e8b2012 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedServiceHealthReportCreatedEvent.js @@ -0,0 +1,186 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Service Health Report Created event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedServiceHealthReportCreatedEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedServiceHealthReportCreatedEvent. + * @member {string} serviceManifestName Service manifest name. + * @member {number} servicePackageInstanceId Id of Service package instance. + * @member {string} servicePackageActivationId Id of Service package + * activation. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} tTLTimespan Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedServiceHealthReportCreatedEvent + * + * @returns {object} metadata of DeployedServiceHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedServiceHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedServiceHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceManifestName: { + required: true, + serializedName: 'ServiceManifestName', + type: { + name: 'String' + } + }, + servicePackageInstanceId: { + required: true, + serializedName: 'ServicePackageInstanceId', + type: { + name: 'Number' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + tTLTimespan: { + required: true, + serializedName: 'TTLTimespan', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedServiceHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedServiceHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/deployedServiceHealthReportExpiredEvent.js new file mode 100644 index 0000000000..9e460c44bf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/deployedServiceHealthReportExpiredEvent.js @@ -0,0 +1,186 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Deployed Service Health Report Expired event. + * + * @extends models['ApplicationEvent'] + */ +class DeployedServiceHealthReportExpiredEvent extends models['ApplicationEvent'] { + /** + * Create a DeployedServiceHealthReportExpiredEvent. + * @member {string} serviceManifest Service manifest name. + * @member {number} servicePackageInstanceId Id of Service package instance. + * @member {string} servicePackageActivationId Id of Service package + * activation. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} tTLTimespan Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DeployedServiceHealthReportExpiredEvent + * + * @returns {object} metadata of DeployedServiceHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'DeployedServiceHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'DeployedServiceHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceManifest: { + required: true, + serializedName: 'ServiceManifest', + type: { + name: 'String' + } + }, + servicePackageInstanceId: { + required: true, + serializedName: 'ServicePackageInstanceId', + type: { + name: 'Number' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + tTLTimespan: { + required: true, + serializedName: 'TTLTimespan', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = DeployedServiceHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealth.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealth.js index 5bb93a9cae..2f915e3dab 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealth.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealth.js @@ -21,9 +21,11 @@ const models = require('./index'); class DeployedServicePackageHealth extends models['EntityHealth'] { /** * Create a DeployedServicePackageHealth. - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {string} [nodeName] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] Name of the service manifest. + * @member {string} [nodeName] Name of the node where this service package is + * deployed. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthEvaluation.js index c04e76bca8..c33f139776 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthEvaluation.js @@ -23,10 +23,13 @@ const models = require('./index'); class DeployedServicePackageHealthEvaluation extends models['HealthEvaluation'] { /** * Create a DeployedServicePackageHealthEvaluation. - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] The name of the service manifest. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state. The type of the unhealthy + * evaluations can be EventHealthEvaluation. */ constructor() { super(); @@ -44,6 +47,11 @@ class DeployedServicePackageHealthEvaluation extends models['HealthEvaluation'] serializedName: 'DeployedServicePackage', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'DeployedServicePackageHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -63,6 +71,7 @@ class DeployedServicePackageHealthEvaluation extends models['HealthEvaluation'] kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthState.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthState.js index ef6b84d2ec..382364d420 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthState.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthState.js @@ -21,10 +21,18 @@ const models = require('./index'); class DeployedServicePackageHealthState extends models['EntityHealthState'] { /** * Create a DeployedServicePackageHealthState. - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] + * @member {string} [nodeName] Name of the node on which the service package + * is deployed. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] Name of the manifest describing the + * service package. + * @member {string} [servicePackageActivationId] 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. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js index 3bdb82ade5..d44f9e4c83 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js @@ -23,8 +23,13 @@ const models = require('./index'); class DeployedServicePackageHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a DeployedServicePackageHealthStateChunk. - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] + * @member {string} [serviceManifestName] The name of the service manifest. + * @member {string} [servicePackageActivationId] 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. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js index 6366e94b96..d272e286cc 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js @@ -52,8 +52,8 @@ class DeployedServicePackageHealthStateFilter { * 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 + * 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. diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js b/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js index 515726ced4..22ca65dd1c 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js @@ -17,12 +17,20 @@ class DeployedServicePackageInfo { /** * Create a DeployedServicePackageInfo. - * @member {string} [name] + * @member {string} [name] The name of the service package as specified in + * the service manifest. * @member {string} [version] The version of the service package specified in * service manifest. - * @member {string} [status] Possible values include: 'Invalid', - * 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' - * @member {string} [servicePackageActivationId] + * @member {string} [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' + * @member {string} [servicePackageActivationId] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackagesHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedServicePackagesHealthEvaluation.js index beb9109bda..cbf4a5eb9c 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackagesHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackagesHealthEvaluation.js @@ -26,7 +26,10 @@ class DeployedServicePackagesHealthEvaluation extends models['HealthEvaluation'] * Create a DeployedServicePackagesHealthEvaluation. * @member {number} [totalCount] Total number of deployed service packages of * the deployed application in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * DeployedServicePackageHealthEvaluation that impacted the aggregated + * health. */ constructor() { super(); @@ -44,6 +47,11 @@ class DeployedServicePackagesHealthEvaluation extends models['HealthEvaluation'] serializedName: 'DeployedServicePackages', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'DeployedServicePackagesHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -63,6 +71,7 @@ class DeployedServicePackagesHealthEvaluation extends models['HealthEvaluation'] kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedServiceReplicaDetailInfo.js b/lib/services/serviceFabric/lib/models/deployedServiceReplicaDetailInfo.js index 2da18d334c..eec0f22d8c 100644 --- a/lib/services/serviceFabric/lib/models/deployedServiceReplicaDetailInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedServiceReplicaDetailInfo.js @@ -19,13 +19,20 @@ const models = require('./index'); class DeployedServiceReplicaDetailInfo { /** * Create a DeployedServiceReplicaDetailInfo. - * @member {string} [serviceName] - * @member {uuid} [partitionId] - * @member {string} [currentServiceOperation] Possible values include: - * 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', 'Abort' + * @member {string} [serviceName] Full hierarchical name of the service in + * URI format starting with `fabric:`. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + * @member {string} [currentServiceOperation] 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' * @member {date} [currentServiceOperationStartTimeUtc] The start time of the * current service operation in UTC format. - * @member {array} [reportedLoad] + * @member {array} [reportedLoad] List of load reported by replica. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -96,6 +103,7 @@ class DeployedServiceReplicaDetailInfo { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedServiceReplicaInfo.js b/lib/services/serviceFabric/lib/models/deployedServiceReplicaInfo.js index 6377425b09..1d67da0be9 100644 --- a/lib/services/serviceFabric/lib/models/deployedServiceReplicaInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedServiceReplicaInfo.js @@ -17,19 +17,33 @@ class DeployedServiceReplicaInfo { /** * Create a DeployedServiceReplicaInfo. - * @member {string} [serviceName] - * @member {string} [serviceTypeName] - * @member {string} [serviceManifestName] - * @member {string} [codePackageName] - * @member {uuid} [partitionId] - * @member {string} [replicaStatus] Possible values include: 'Invalid', - * 'InBuild', 'Standby', 'Ready', 'Down', 'Dropped' + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {string} [serviceTypeName] Name of the service type as specified + * in the service manifest. + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. + * @member {string} [codePackageName] The name of the code package that hosts + * this replica. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + * @member {string} [replicaStatus] The status of a replica of a service. + * Possible values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + * 'Dropped' * @member {string} [address] The last address returned by the replica in * Open or ChangeRole. - * @member {string} [servicePackageActivationId] - * @member {string} [hostProcessId] Host process id of the process that is + * @member {string} [servicePackageActivationId] 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. + * @member {string} [hostProcessId] 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. + * containers this host process ID will be from different kernel. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -120,6 +134,7 @@ class DeployedServiceReplicaInfo { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedServiceTypeInfo.js b/lib/services/serviceFabric/lib/models/deployedServiceTypeInfo.js index 8429729957..df6f841cb9 100644 --- a/lib/services/serviceFabric/lib/models/deployedServiceTypeInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedServiceTypeInfo.js @@ -18,12 +18,21 @@ class DeployedServiceTypeInfo { /** * Create a DeployedServiceTypeInfo. - * @member {string} [serviceTypeName] - * @member {string} [serviceManifestName] - * @member {string} [codePackageName] - * @member {string} [status] Possible values include: 'Invalid', 'Disabled', - * 'Enabled', 'Registered' - * @member {string} [servicePackageActivationId] + * @member {string} [serviceTypeName] Name of the service type as specified + * in the service manifest. + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. + * @member {string} [codePackageName] The name of the code package that + * registered the service type. + * @member {string} [status] The status of the service type registration on + * the node. Possible values include: 'Invalid', 'Disabled', 'Enabled', + * 'Registered' + * @member {string} [servicePackageActivationId] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaDetailInfo.js b/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaDetailInfo.js index ecb3ea19ca..b0c51d1e00 100644 --- a/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaDetailInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaDetailInfo.js @@ -22,17 +22,31 @@ const models = require('./index'); class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceReplicaDetailInfo'] { /** * Create a DeployedStatefulServiceReplicaDetailInfo. - * @member {string} [replicaId] - * @member {string} [currentReplicatorOperation] Possible values include: + * @member {string} [replicaId] 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. + * @member {string} [currentReplicatorOperation] Specifies the operation + * currently being executed by the Replicator. Possible values include: * 'Invalid', 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', * 'OnDataLoss', 'WaitForCatchup', 'Build' - * @member {string} [readStatus] Possible values include: 'Invalid', - * 'Granted', 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' - * @member {string} [writeStatus] Possible values include: 'Invalid', - * 'Granted', 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' - * @member {object} [replicatorStatus] + * @member {string} [readStatus] Specifies the access status of the + * partition. Possible values include: 'Invalid', 'Granted', + * 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' + * @member {string} [writeStatus] Specifies the access status of the + * partition. Possible values include: 'Invalid', 'Granted', + * 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' + * @member {object} [replicatorStatus] 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. * @member {string} [replicatorStatus.kind] Polymorphic Discriminator - * @member {object} [replicaStatus] + * @member {object} [replicaStatus] Key value store related information for + * the replica. * @member {string} [replicaStatus.databaseRowCountEstimate] Value indicating * the estimated number of rows in the underlying database. * @member {string} [replicaStatus.databaseLogicalSizeEstimate] Value @@ -45,24 +59,36 @@ class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceRe * there is no pending callback. * @member {string} [replicaStatus.statusDetails] Value indicating the * current status details of the replica. - * @member {object} [deployedServiceReplicaQueryResult] - * @member {string} [deployedServiceReplicaQueryResult.replicaId] - * @member {string} [deployedServiceReplicaQueryResult.replicaRole] Possible - * values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - * 'ActiveSecondary' + * @member {object} [deployedServiceReplicaQueryResult] Information about a + * stateful service replica deployed on a node. + * @member {string} [deployedServiceReplicaQueryResult.replicaId] 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. + * @member {string} [deployedServiceReplicaQueryResult.replicaRole] The role + * of a replica of a stateful service. Possible values include: 'Unknown', + * 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' * @member {object} - * [deployedServiceReplicaQueryResult.reconfigurationInformation] + * [deployedServiceReplicaQueryResult.reconfigurationInformation] Information + * about current reconfiguration like phase, type, previous configuration + * role of replica and reconfiguration start date time. * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.previousConfigurationRole] - * Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - * 'ActiveSecondary' + * Replica role before reconfiguration started. Possible values include: + * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationPhase] - * Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - * 'Phase3', 'Phase4', 'AbortPhaseZero' + * 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' * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationType] - * Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + * Type of current ongoing reconfiguration. If no reconfiguration is taking + * place then this value will be "None". Possible values include: 'Unknown', + * 'SwapPrimary', 'Failover', 'Other' * @member {date} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationStartTimeUtc] * Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration @@ -84,6 +110,11 @@ class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceRe serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaDetailInfo', className: 'DeployedStatefulServiceReplicaDetailInfo', modelProperties: { serviceName: { @@ -132,6 +163,7 @@ class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceRe serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } @@ -182,6 +214,11 @@ class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceRe serializedName: 'ReplicaStatus', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicaStatusBase', className: 'KeyValueStoreReplicaStatus' } }, @@ -190,6 +227,11 @@ class DeployedStatefulServiceReplicaDetailInfo extends models['DeployedServiceRe serializedName: 'DeployedServiceReplicaQueryResult', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaInfo', className: 'DeployedStatefulServiceReplicaInfo' } } diff --git a/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaInfo.js b/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaInfo.js index 226d8509b1..53e90cbab7 100644 --- a/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedStatefulServiceReplicaInfo.js @@ -20,18 +20,30 @@ const models = require('./index'); class DeployedStatefulServiceReplicaInfo extends models['DeployedServiceReplicaInfo'] { /** * Create a DeployedStatefulServiceReplicaInfo. - * @member {string} [replicaId] - * @member {string} [replicaRole] Possible values include: 'Unknown', 'None', - * 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {object} [reconfigurationInformation] + * @member {string} [replicaId] 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. + * @member {string} [replicaRole] The role of a replica of a stateful + * service. Possible values include: 'Unknown', 'None', 'Primary', + * 'IdleSecondary', 'ActiveSecondary' + * @member {object} [reconfigurationInformation] Information about current + * reconfiguration like phase, type, previous configuration role of replica + * and reconfiguration start date time. * @member {string} [reconfigurationInformation.previousConfigurationRole] - * Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - * 'ActiveSecondary' - * @member {string} [reconfigurationInformation.reconfigurationPhase] - * Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - * 'Phase3', 'Phase4', 'AbortPhaseZero' - * @member {string} [reconfigurationInformation.reconfigurationType] Possible - * values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + * Replica role before reconfiguration started. Possible values include: + * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' + * @member {string} [reconfigurationInformation.reconfigurationPhase] 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' + * @member {string} [reconfigurationInformation.reconfigurationType] Type of + * current ongoing reconfiguration. If no reconfiguration is taking place + * then this value will be "None". Possible values include: 'Unknown', + * 'SwapPrimary', 'Failover', 'Other' * @member {date} [reconfigurationInformation.reconfigurationStartTimeUtc] * Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration * is taking place then this value will be zero date-time. @@ -52,6 +64,11 @@ class DeployedStatefulServiceReplicaInfo extends models['DeployedServiceReplicaI serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaInfo', className: 'DeployedStatefulServiceReplicaInfo', modelProperties: { serviceName: { @@ -120,6 +137,7 @@ class DeployedStatefulServiceReplicaInfo extends models['DeployedServiceReplicaI serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceDetailInfo.js b/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceDetailInfo.js index ad2bfc0520..f7667bbb9f 100644 --- a/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceDetailInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceDetailInfo.js @@ -22,9 +22,20 @@ const models = require('./index'); class DeployedStatelessServiceInstanceDetailInfo extends models['DeployedServiceReplicaDetailInfo'] { /** * Create a DeployedStatelessServiceInstanceDetailInfo. - * @member {string} [instanceId] - * @member {object} [deployedServiceReplicaQueryResult] - * @member {string} [deployedServiceReplicaQueryResult.instanceId] + * @member {string} [instanceId] 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. + * @member {object} [deployedServiceReplicaQueryResult] Information about a + * stateless service instance deployed on a node. + * @member {string} [deployedServiceReplicaQueryResult.instanceId] 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. */ constructor() { super(); @@ -42,6 +53,11 @@ class DeployedStatelessServiceInstanceDetailInfo extends models['DeployedService serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaDetailInfo', className: 'DeployedStatelessServiceInstanceDetailInfo', modelProperties: { serviceName: { @@ -90,6 +106,7 @@ class DeployedStatelessServiceInstanceDetailInfo extends models['DeployedService serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } @@ -106,6 +123,11 @@ class DeployedStatelessServiceInstanceDetailInfo extends models['DeployedService serializedName: 'DeployedServiceReplicaQueryResult', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaInfo', className: 'DeployedStatelessServiceInstanceInfo' } } diff --git a/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceInfo.js b/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceInfo.js index 26ecbdca84..c800cbc9e6 100644 --- a/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedStatelessServiceInstanceInfo.js @@ -20,7 +20,12 @@ const models = require('./index'); class DeployedStatelessServiceInstanceInfo extends models['DeployedServiceReplicaInfo'] { /** * Create a DeployedStatelessServiceInstanceInfo. - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ constructor() { super(); @@ -38,6 +43,11 @@ class DeployedStatelessServiceInstanceInfo extends models['DeployedServiceReplic serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'DeployedServiceReplicaInfo', className: 'DeployedStatelessServiceInstanceInfo', modelProperties: { serviceName: { @@ -106,6 +116,7 @@ class DeployedStatelessServiceInstanceInfo extends models['DeployedServiceReplic serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/doublePropertyValue.js b/lib/services/serviceFabric/lib/models/doublePropertyValue.js new file mode 100644 index 0000000000..1066da0a37 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/doublePropertyValue.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a Service Fabric property value of type Double. + * + * @extends models['PropertyValue'] + */ +class DoublePropertyValue extends models['PropertyValue'] { + /** + * Create a DoublePropertyValue. + * @member {number} data The data of the property value. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DoublePropertyValue + * + * @returns {object} metadata of DoublePropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'Double', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'DoublePropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + data: { + required: true, + serializedName: 'Data', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = DoublePropertyValue; diff --git a/lib/services/serviceFabric/lib/models/enableBackupDescription.js b/lib/services/serviceFabric/lib/models/enableBackupDescription.js new file mode 100644 index 0000000000..2c7d427aaf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/enableBackupDescription.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Specifies the parameters needed to enable periodic backup. + * + */ +class EnableBackupDescription { + /** + * Create a EnableBackupDescription. + * @member {string} backupPolicyName Name of the backup policy to be used for + * enabling periodic backups. + */ + constructor() { + } + + /** + * Defines the metadata of EnableBackupDescription + * + * @returns {object} metadata of EnableBackupDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'EnableBackupDescription', + type: { + name: 'Composite', + className: 'EnableBackupDescription', + modelProperties: { + backupPolicyName: { + required: true, + serializedName: 'BackupPolicyName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = EnableBackupDescription; diff --git a/lib/services/serviceFabric/lib/models/ensureAvailabilitySafetyCheck.js b/lib/services/serviceFabric/lib/models/ensureAvailabilitySafetyCheck.js index aa2b4b5f5e..cea6ae9582 100644 --- a/lib/services/serviceFabric/lib/models/ensureAvailabilitySafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/ensureAvailabilitySafetyCheck.js @@ -39,11 +39,17 @@ class EnsureAvailabilitySafetyCheck extends models['PartitionSafetyCheck'] { serializedName: 'EnsureAvailability', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'EnsureAvailabilitySafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/ensurePartitionQurumSafetyCheck.js b/lib/services/serviceFabric/lib/models/ensurePartitionQurumSafetyCheck.js index 532d7105db..d2764e7596 100644 --- a/lib/services/serviceFabric/lib/models/ensurePartitionQurumSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/ensurePartitionQurumSafetyCheck.js @@ -38,11 +38,17 @@ class EnsurePartitionQurumSafetyCheck extends models['PartitionSafetyCheck'] { serializedName: 'EnsurePartitionQuorum', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'EnsurePartitionQurumSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/entityHealth.js b/lib/services/serviceFabric/lib/models/entityHealth.js index ce2e2e4a07..f533f8e16c 100644 --- a/lib/services/serviceFabric/lib/models/entityHealth.js +++ b/lib/services/serviceFabric/lib/models/entityHealth.js @@ -21,12 +21,18 @@ const models = require('./index'); class EntityHealth { /** * Create a EntityHealth. - * @member {string} [aggregatedHealthState] Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] 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' * @member {array} [healthEvents] The list of health events reported on the * entity. - * @member {array} [unhealthyEvaluations] - * @member {object} [healthStatistics] + * @member {array} [unhealthyEvaluations] The unhealthy evaluations that show + * why the current aggregated health state was returned by Health Manager. + * @member {object} [healthStatistics] Shows the health statistics for all + * children types of the queried entity. * @member {array} [healthStatistics.healthStateCountList] 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. diff --git a/lib/services/serviceFabric/lib/models/entityHealthState.js b/lib/services/serviceFabric/lib/models/entityHealthState.js index 69910b5535..7f47b6a4db 100644 --- a/lib/services/serviceFabric/lib/models/entityHealthState.js +++ b/lib/services/serviceFabric/lib/models/entityHealthState.js @@ -18,8 +18,10 @@ class EntityHealthState { /** * Create a EntityHealthState. - * @member {string} [aggregatedHealthState] Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/entityHealthStateChunk.js b/lib/services/serviceFabric/lib/models/entityHealthStateChunk.js index fb5d680e5a..e8c38e8328 100644 --- a/lib/services/serviceFabric/lib/models/entityHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/entityHealthStateChunk.js @@ -18,8 +18,9 @@ class EntityHealthStateChunk { /** * Create a EntityHealthStateChunk. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/entityKindHealthStateCount.js b/lib/services/serviceFabric/lib/models/entityKindHealthStateCount.js index da363bc1a6..381ed5adcc 100644 --- a/lib/services/serviceFabric/lib/models/entityKindHealthStateCount.js +++ b/lib/services/serviceFabric/lib/models/entityKindHealthStateCount.js @@ -19,10 +19,12 @@ const models = require('./index'); class EntityKindHealthStateCount { /** * Create a EntityKindHealthStateCount. - * @member {string} [entityKind] Possible values include: 'Invalid', 'Node', - * 'Partition', 'Service', 'Application', 'Replica', 'DeployedApplication', + * @member {string} [entityKind] The entity kind for which health states are + * evaluated. Possible values include: 'Invalid', 'Node', 'Partition', + * 'Service', 'Application', 'Replica', 'DeployedApplication', * 'DeployedServicePackage', 'Cluster' - * @member {object} [healthStateCount] + * @member {object} [healthStateCount] The health state count for the + * entities of the specified kind. * @member {number} [healthStateCount.okCount] The number of health entities * with aggregated health state Ok. * @member {number} [healthStateCount.warningCount] The number of health diff --git a/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js b/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js index 89d14f17a1..948179ae85 100644 --- a/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js @@ -27,7 +27,9 @@ class EventHealthEvaluation extends models['HealthEvaluation'] { * @member {boolean} [considerWarningAsError] Indicates whether warnings are * treated with the same severity as errors. The field is specified in the * health policy used to evaluate the entity. - * @member {object} [unhealthyEvent] + * @member {object} [unhealthyEvent] Represents health information reported + * on a health entity, such as cluster, application or node, with additional + * metadata added by the Health Manager. * @member {boolean} [unhealthyEvent.isExpired] Returns true if the health * event is expired, otherwise false. * @member {date} [unhealthyEvent.sourceUtcTimestamp] The date and time when @@ -88,6 +90,11 @@ class EventHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Event', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'EventHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -107,6 +114,7 @@ class EventHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/executingFaultsChaosEvent.js b/lib/services/serviceFabric/lib/models/executingFaultsChaosEvent.js index ca72bf12f6..854024414f 100644 --- a/lib/services/serviceFabric/lib/models/executingFaultsChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/executingFaultsChaosEvent.js @@ -22,7 +22,8 @@ const models = require('./index'); class ExecutingFaultsChaosEvent extends models['ChaosEvent'] { /** * Create a ExecutingFaultsChaosEvent. - * @member {array} [faults] + * @member {array} [faults] List of string description of the faults that + * Chaos decided to execute in an iteration. */ constructor() { super(); @@ -40,6 +41,11 @@ class ExecutingFaultsChaosEvent extends models['ChaosEvent'] { serializedName: 'ExecutingFaults', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'ExecutingFaultsChaosEvent', modelProperties: { timeStampUtc: { @@ -52,6 +58,7 @@ class ExecutingFaultsChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/externalStoreProvisionApplicationTypeDescription.js b/lib/services/serviceFabric/lib/models/externalStoreProvisionApplicationTypeDescription.js new file mode 100644 index 0000000000..b6a9c563a7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/externalStoreProvisionApplicationTypeDescription.js @@ -0,0 +1,101 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * @extends models['ProvisionApplicationTypeDescriptionBase'] + */ +class ExternalStoreProvisionApplicationTypeDescription extends models['ProvisionApplicationTypeDescriptionBase'] { + /** + * Create a ExternalStoreProvisionApplicationTypeDescription. + * @member {string} applicationPackageDownloadUri 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. + * @member {string} applicationTypeName The application type name represents + * the name of the application type found in the application manifest. + * @member {string} applicationTypeVersion The application type version + * represents the version of the application type found in the application + * manifest. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExternalStoreProvisionApplicationTypeDescription + * + * @returns {object} metadata of ExternalStoreProvisionApplicationTypeDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ExternalStore', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ProvisionApplicationTypeDescriptionBase', + className: 'ExternalStoreProvisionApplicationTypeDescription', + modelProperties: { + async: { + required: true, + serializedName: 'Async', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationPackageDownloadUri: { + required: true, + serializedName: 'ApplicationPackageDownloadUri', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExternalStoreProvisionApplicationTypeDescription; diff --git a/lib/services/serviceFabric/lib/models/fabricError.js b/lib/services/serviceFabric/lib/models/fabricError.js index 08ff1c4327..12afc6a978 100644 --- a/lib/services/serviceFabric/lib/models/fabricError.js +++ b/lib/services/serviceFabric/lib/models/fabricError.js @@ -22,9 +22,110 @@ const models = require('./index'); class FabricError { /** * Create a FabricError. - * @member {object} error - * @member {string} [error.code] Possible values include: - * 'FABRIC_E_INVALID_PARTITION_KEY', + * @member {object} error Error object containing error code and error + * message. + * @member {string} [error.code] 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" + * + * - 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" + * + * - 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', @@ -67,7 +168,15 @@ class FabricError { * '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' + * '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' * @member {string} [error.message] Error message. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/fabricErrorError.js b/lib/services/serviceFabric/lib/models/fabricErrorError.js index 87b7225f10..f5fe867df5 100644 --- a/lib/services/serviceFabric/lib/models/fabricErrorError.js +++ b/lib/services/serviceFabric/lib/models/fabricErrorError.js @@ -17,8 +17,108 @@ class FabricErrorError { /** * Create a FabricErrorError. - * @member {string} code Possible values include: - * 'FABRIC_E_INVALID_PARTITION_KEY', + * @member {string} code 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" + * + * - 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" + * + * - 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', @@ -61,7 +161,15 @@ class FabricErrorError { * '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' + * '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' * @member {string} [message] Error message. */ constructor() { @@ -76,7 +184,7 @@ class FabricErrorError { mapper() { return { required: false, - serializedName: 'FabricError_Error', + serializedName: 'FabricErrorError', type: { name: 'Composite', className: 'FabricErrorError', diff --git a/lib/services/serviceFabric/lib/models/fabricEvent.js b/lib/services/serviceFabric/lib/models/fabricEvent.js new file mode 100644 index 0000000000..21f62dbe8d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/fabricEvent.js @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Represents the base for all Fabric Events. + * + */ +class FabricEvent { + /** + * Create a FabricEvent. + * @member {uuid} eventInstanceId The identifier for the FabricEvent + * instance. + * @member {date} timeStamp The time event was logged. + * @member {boolean} [hasCorrelatedEvents] Shows there is existing related + * events available. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of FabricEvent + * + * @returns {object} metadata of FabricEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'FabricEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'FabricEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FabricEvent; diff --git a/lib/services/serviceFabric/lib/models/failedPropertyBatchInfo.js b/lib/services/serviceFabric/lib/models/failedPropertyBatchInfo.js new file mode 100644 index 0000000000..d003ff8f08 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/failedPropertyBatchInfo.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Derived from PropertyBatchInfo. Represents the property batch failing. + * Contains information about the specific batch failure. + * + * @extends models['PropertyBatchInfo'] + */ +class FailedPropertyBatchInfo extends models['PropertyBatchInfo'] { + /** + * Create a FailedPropertyBatchInfo. + * @member {string} [errorMessage] The error message of the failed operation. + * Describes the exception thrown due to the first unsuccessful operation in + * the property batch. + * @member {number} [operationIndex] The index of the unsuccessful operation + * in the property batch. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FailedPropertyBatchInfo + * + * @returns {object} metadata of FailedPropertyBatchInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Failed', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchInfo', + className: 'FailedPropertyBatchInfo', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + errorMessage: { + required: false, + serializedName: 'ErrorMessage', + type: { + name: 'String' + } + }, + operationIndex: { + required: false, + serializedName: 'OperationIndex', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = FailedPropertyBatchInfo; diff --git a/lib/services/serviceFabric/lib/models/failedUpgradeDomainProgressObject.js b/lib/services/serviceFabric/lib/models/failedUpgradeDomainProgressObject.js index 2ce9974bec..130a60b09f 100644 --- a/lib/services/serviceFabric/lib/models/failedUpgradeDomainProgressObject.js +++ b/lib/services/serviceFabric/lib/models/failedUpgradeDomainProgressObject.js @@ -20,8 +20,9 @@ const models = require('./index'); class FailedUpgradeDomainProgressObject { /** * Create a FailedUpgradeDomainProgressObject. - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and + * their statuses */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/failureUpgradeDomainProgressInfo.js b/lib/services/serviceFabric/lib/models/failureUpgradeDomainProgressInfo.js index e046ae125e..fa1221d39c 100644 --- a/lib/services/serviceFabric/lib/models/failureUpgradeDomainProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/failureUpgradeDomainProgressInfo.js @@ -20,8 +20,9 @@ const models = require('./index'); class FailureUpgradeDomainProgressInfo { /** * Create a FailureUpgradeDomainProgressInfo. - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and + * their statuses */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/fileInfo.js b/lib/services/serviceFabric/lib/models/fileInfo.js index aa63386d43..93349f5ebd 100644 --- a/lib/services/serviceFabric/lib/models/fileInfo.js +++ b/lib/services/serviceFabric/lib/models/fileInfo.js @@ -20,12 +20,16 @@ class FileInfo { /** * Create a FileInfo. * @member {string} [fileSize] The size of file in bytes. - * @member {object} [fileVersion] - * @member {string} [fileVersion.versionNumber] The current iamge store + * @member {object} [fileVersion] Information about the version of image + * store file. + * @member {string} [fileVersion.versionNumber] The current image store * version number for the file is used in image store for checking whether it * need to be updated. * @member {string} [fileVersion.epochDataLossNumber] The epoch data loss - * number of image store file is used to indicate the status of data loss. + * number of image store replica when this file entry was updated or created. + * @member {string} [fileVersion.epochConfigurationNumber] The epoch + * configuration version number of the image store replica when this file + * entry was created or updated. * @member {date} [modifiedDate] The date and time when the image store file * was last modified. * @member {string} [storeRelativePath] The file path relative to the image diff --git a/lib/services/serviceFabric/lib/models/fileShareBackupStorageDescription.js b/lib/services/serviceFabric/lib/models/fileShareBackupStorageDescription.js new file mode 100644 index 0000000000..e050cf6adb --- /dev/null +++ b/lib/services/serviceFabric/lib/models/fileShareBackupStorageDescription.js @@ -0,0 +1,114 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the parameters for file share storage used for storing or + * enumerating backups. + * + * @extends models['BackupStorageDescription'] + */ +class FileShareBackupStorageDescription extends models['BackupStorageDescription'] { + /** + * Create a FileShareBackupStorageDescription. + * @member {string} path UNC path of the file share where to store or + * enumerate backups from. + * @member {string} [primaryUserName] Primary user name to access the file + * share. + * @member {string} [primaryPassword] Primary password to access the share + * location. + * @member {string} [secondaryUserName] Secondary user name to access the + * file share. + * @member {string} [secondaryPassword] Secondary password to access the + * share location + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FileShareBackupStorageDescription + * + * @returns {object} metadata of FileShareBackupStorageDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'FileShare', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'FileShareBackupStorageDescription', + modelProperties: { + friendlyName: { + required: false, + serializedName: 'FriendlyName', + type: { + name: 'String' + } + }, + storageKind: { + required: true, + serializedName: 'StorageKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + path: { + required: true, + serializedName: 'Path', + type: { + name: 'String' + } + }, + primaryUserName: { + required: false, + serializedName: 'PrimaryUserName', + type: { + name: 'String' + } + }, + primaryPassword: { + required: false, + serializedName: 'PrimaryPassword', + type: { + name: 'String' + } + }, + secondaryUserName: { + required: false, + serializedName: 'SecondaryUserName', + type: { + name: 'String' + } + }, + secondaryPassword: { + required: false, + serializedName: 'SecondaryPassword', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = FileShareBackupStorageDescription; diff --git a/lib/services/serviceFabric/lib/models/fileVersion.js b/lib/services/serviceFabric/lib/models/fileVersion.js index f355841593..d786d21170 100644 --- a/lib/services/serviceFabric/lib/models/fileVersion.js +++ b/lib/services/serviceFabric/lib/models/fileVersion.js @@ -17,11 +17,14 @@ class FileVersion { /** * Create a FileVersion. - * @member {string} [versionNumber] The current iamge store version number + * @member {string} [versionNumber] The current image store version number * for the file is used in image store for checking whether it need to be * updated. * @member {string} [epochDataLossNumber] The epoch data loss number of image - * store file is used to indicate the status of data loss. + * store replica when this file entry was updated or created. + * @member {string} [epochConfigurationNumber] The epoch configuration + * version number of the image store replica when this file entry was created + * or updated. */ constructor() { } @@ -53,6 +56,13 @@ class FileVersion { type: { name: 'String' } + }, + epochConfigurationNumber: { + required: false, + serializedName: 'EpochConfigurationNumber', + type: { + name: 'String' + } } } } diff --git a/lib/services/serviceFabric/lib/models/folderInfo.js b/lib/services/serviceFabric/lib/models/folderInfo.js index 53c5c18e5c..eea9433797 100644 --- a/lib/services/serviceFabric/lib/models/folderInfo.js +++ b/lib/services/serviceFabric/lib/models/folderInfo.js @@ -11,16 +11,17 @@ 'use strict'; /** - * Information about a image store folder. It inclues how many files this + * Information about a image store folder. It includes how many files this * folder contains and its image store relative path. * */ class FolderInfo { /** * Create a FolderInfo. - * @member {string} [storeRelativePath] - * @member {uuid} [fileCount] The number of files from within the image store - * folder. + * @member {string} [storeRelativePath] The remote location within image + * store. This path is relative to the image store root. + * @member {number} [fileCount] The number of files from within the image + * store folder. */ constructor() { } @@ -50,7 +51,7 @@ class FolderInfo { required: false, serializedName: 'FileCount', type: { - name: 'String' + name: 'Number' } } } diff --git a/lib/services/serviceFabric/lib/models/frequencyBasedBackupScheduleDescription.js b/lib/services/serviceFabric/lib/models/frequencyBasedBackupScheduleDescription.js new file mode 100644 index 0000000000..903d9d123e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/frequencyBasedBackupScheduleDescription.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the frequency based backup schedule. + * + * @extends models['BackupScheduleDescription'] + */ +class FrequencyBasedBackupScheduleDescription extends models['BackupScheduleDescription'] { + /** + * Create a FrequencyBasedBackupScheduleDescription. + * @member {moment.duration} interval 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. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of FrequencyBasedBackupScheduleDescription + * + * @returns {object} metadata of FrequencyBasedBackupScheduleDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'FrequencyBased', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ScheduleKind', + clientName: 'scheduleKind' + }, + uberParent: 'BackupScheduleDescription', + className: 'FrequencyBasedBackupScheduleDescription', + modelProperties: { + scheduleKind: { + required: true, + serializedName: 'ScheduleKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + interval: { + required: true, + serializedName: 'Interval', + type: { + name: 'TimeSpan' + } + } + } + } + }; + } +} + +module.exports = FrequencyBasedBackupScheduleDescription; diff --git a/lib/services/serviceFabric/lib/models/getBackupByStorageQueryDescription.js b/lib/services/serviceFabric/lib/models/getBackupByStorageQueryDescription.js new file mode 100644 index 0000000000..8b98b2d7d0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/getBackupByStorageQueryDescription.js @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes additional filters to be applied, while listing backups, and + * backup storage details from where to fetch the backups. + * + */ +class GetBackupByStorageQueryDescription { + /** + * Create a GetBackupByStorageQueryDescription. + * @member {date} [startDateTimeFilter] Specifies the start date time in + * ISO8601 from which to enumerate backups. If not specified, backups are + * enumerated from the beginning. + * @member {date} [endDateTimeFilter] Specifies the end date time in ISO8601 + * till which to enumerate backups. If not specified, backups are enumerated + * till the end. + * @member {boolean} [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 . + * @member {object} storage 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. + * @member {string} [storage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [storage.storageKind] Polymorphic Discriminator + * @member {object} backupEntity Indicates the entity for which to enumerate + * backups. + * @member {string} [backupEntity.entityKind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of GetBackupByStorageQueryDescription + * + * @returns {object} metadata of GetBackupByStorageQueryDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'GetBackupByStorageQueryDescription', + type: { + name: 'Composite', + className: 'GetBackupByStorageQueryDescription', + modelProperties: { + startDateTimeFilter: { + required: false, + serializedName: 'StartDateTimeFilter', + type: { + name: 'DateTime' + } + }, + endDateTimeFilter: { + required: false, + serializedName: 'EndDateTimeFilter', + type: { + name: 'DateTime' + } + }, + latest: { + required: false, + serializedName: 'Latest', + defaultValue: false, + type: { + name: 'Boolean' + } + }, + storage: { + required: true, + serializedName: 'Storage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'BackupStorageDescription' + } + }, + backupEntity: { + required: true, + serializedName: 'BackupEntity', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'BackupEntity' + } + } + } + } + }; + } +} + +module.exports = GetBackupByStorageQueryDescription; diff --git a/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js new file mode 100644 index 0000000000..f2b0b97d56 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class GetPropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a GetPropertyBatchOperation. + * @member {boolean} [includeValue] 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 . + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GetPropertyBatchOperation + * + * @returns {object} metadata of GetPropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'Get', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'GetPropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + includeValue: { + required: false, + serializedName: 'IncludeValue', + defaultValue: false, + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = GetPropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/guidPropertyValue.js b/lib/services/serviceFabric/lib/models/guidPropertyValue.js new file mode 100644 index 0000000000..4f84cc41b7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/guidPropertyValue.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a Service Fabric property value of type Guid. + * + * @extends models['PropertyValue'] + */ +class GuidPropertyValue extends models['PropertyValue'] { + /** + * Create a GuidPropertyValue. + * @member {uuid} data The data of the property value. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GuidPropertyValue + * + * @returns {object} metadata of GuidPropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'Guid', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'GuidPropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + data: { + required: true, + serializedName: 'Data', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GuidPropertyValue; diff --git a/lib/services/serviceFabric/lib/models/healthEvaluation.js b/lib/services/serviceFabric/lib/models/healthEvaluation.js index bdb437e637..00cdb40983 100644 --- a/lib/services/serviceFabric/lib/models/healthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/healthEvaluation.js @@ -18,8 +18,10 @@ class HealthEvaluation { /** * Create a HealthEvaluation. - * @member {string} [aggregatedHealthState] Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * @member {string} [description] Description of the health evaluation, which * represents a summary of the evaluation process. * @member {string} kind Polymorphic Discriminator @@ -63,6 +65,7 @@ class HealthEvaluation { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/healthEvaluationWrapper.js b/lib/services/serviceFabric/lib/models/healthEvaluationWrapper.js index b718b640b3..bb62cce192 100644 --- a/lib/services/serviceFabric/lib/models/healthEvaluationWrapper.js +++ b/lib/services/serviceFabric/lib/models/healthEvaluationWrapper.js @@ -19,9 +19,13 @@ const models = require('./index'); class HealthEvaluationWrapper { /** * Create a HealthEvaluationWrapper. - * @member {object} [healthEvaluation] - * @member {string} [healthEvaluation.aggregatedHealthState] Possible values - * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {object} [healthEvaluation] Represents a health evaluation which + * describes the data and the algorithm used by health manager to evaluate + * the health of an entity. + * @member {string} [healthEvaluation.aggregatedHealthState] The health state + * of a Service Fabric entity such as Cluster, Node, Application, Service, + * Partition, Replica etc. Possible values include: 'Invalid', 'Ok', + * 'Warning', 'Error', 'Unknown' * @member {string} [healthEvaluation.description] Description of the health * evaluation, which represents a summary of the evaluation process. * @member {string} [healthEvaluation.kind] Polymorphic Discriminator diff --git a/lib/services/serviceFabric/lib/models/healthInformation.js b/lib/services/serviceFabric/lib/models/healthInformation.js index 7aeaa50e51..e1b33a06e3 100644 --- a/lib/services/serviceFabric/lib/models/healthInformation.js +++ b/lib/services/serviceFabric/lib/models/healthInformation.js @@ -36,10 +36,11 @@ class HealthInformation { * * Together with the SourceId, the property uniquely identifies the health * information. - * @member {string} healthState Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * @member {string} healthState The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {moment.duration} [timeToLiveInMilliSeconds] The duration for - * which this health report is valid. This field is using ISO8601 format 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. @@ -69,7 +70,7 @@ class HealthInformation { * when a report is added. * @member {boolean} [removeWhenExpired] Value that indicates whether the * report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. diff --git a/lib/services/serviceFabric/lib/models/imageStoreContent.js b/lib/services/serviceFabric/lib/models/imageStoreContent.js index 99a625f20a..dfaf6b811b 100644 --- a/lib/services/serviceFabric/lib/models/imageStoreContent.js +++ b/lib/services/serviceFabric/lib/models/imageStoreContent.js @@ -21,9 +21,8 @@ class ImageStoreContent { * Create a ImageStoreContent. * @member {array} [storeFiles] The list of image store file info objects * represents files found under the given image store relative path. - * @member {array} [storeFolders] The list of image store folder info - * objectes represents subfolders found under the given image store relative - * path. + * @member {array} [storeFolders] The list of image store folder info objects + * represents subfolders found under the given image store relative path. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/index.d.ts b/lib/services/serviceFabric/lib/models/index.d.ts index 7a5ece902f..9388765f08 100644 --- a/lib/services/serviceFabric/lib/models/index.d.ts +++ b/lib/services/serviceFabric/lib/models/index.d.ts @@ -41,7 +41,8 @@ export interface AadMetadata { * cluster. * * @member {string} [type] The client authentication method. - * @member {object} [metadata] + * @member {object} [metadata] Azure Active Directory metadata used for secured + * connection to cluster. * @member {string} [metadata.authority] The AAD authority url. * @member {string} [metadata.client] The AAD client application Id. * @member {string} [metadata.cluster] The AAD cluster application Id. @@ -55,6 +56,57 @@ export interface AadMetadataObject { metadata?: AadMetadata; } +/** + * @class + * Initializes a new instance of the AnalysisEventMetadata class. + * @constructor + * Metadata about an Analysis Event. + * + * @member {moment.duration} [delay] The analysis delay. + * @member {moment.duration} [duration] The duration of analysis. + */ +export interface AnalysisEventMetadata { + delay?: moment.Duration; + duration?: moment.Duration; +} + +/** + * @class + * Initializes a new instance of the FabricEvent class. + * @constructor + * Represents the base for all Fabric Events. + * + * @member {uuid} eventInstanceId The identifier for the FabricEvent instance. + * @member {date} timeStamp The time event was logged. + * @member {boolean} [hasCorrelatedEvents] Shows there is existing related + * events available. + * @member {string} kind Polymorphic Discriminator + */ +export interface FabricEvent { + eventInstanceId: string; + timeStamp: Date; + hasCorrelatedEvents?: boolean; + kind: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationEvent class. + * @constructor + * Represents the base for all Application Events. + * + * @member {string} applicationId The identity of the application. This is an + * encoded representation of the application name. This is used in the REST + * APIs to identify the application resource. + * Starting in version 6.0, hierarchical names are delimited with the "\~" + * character. For example, if the application name is "fabric:/myapp/app1", + * the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in + * previous versions. + */ +export interface ApplicationEvent extends FabricEvent { + applicationId: string; +} + /** * @class * Initializes a new instance of the EntityHealthState class. @@ -62,8 +114,10 @@ export interface AadMetadataObject { * A base type for the health state of various entities in the cluster. It * contains the aggregated health state. * - * @member {string} [aggregatedHealthState] Possible values include: 'Invalid', - * 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' */ export interface EntityHealthState { aggregatedHealthState?: string; @@ -76,7 +130,8 @@ export interface EntityHealthState { * Represents the health state of a service, which contains the service * identifier and its aggregated health state. * - * @member {string} [serviceName] + * @member {string} [serviceName] Name of the service whose health state is + * represented by this object. */ export interface ServiceHealthState extends EntityHealthState { serviceName?: string; @@ -89,8 +144,10 @@ export interface ServiceHealthState extends EntityHealthState { * Represents the health state of a deployed application, which contains the * entity identifier and the aggregated health state. * - * @member {string} [nodeName] - * @member {string} [applicationName] + * @member {string} [nodeName] Name of the node on which the service package is + * deployed. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. */ export interface DeployedApplicationHealthState extends EntityHealthState { nodeName?: string; @@ -105,12 +162,18 @@ export interface DeployedApplicationHealthState extends EntityHealthState { * aggregated health state, health events and unhealthy evaluation. * * - * @member {string} [aggregatedHealthState] Possible values include: 'Invalid', - * 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] 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' * @member {array} [healthEvents] The list of health events reported on the * entity. - * @member {array} [unhealthyEvaluations] - * @member {object} [healthStatistics] + * @member {array} [unhealthyEvaluations] The unhealthy evaluations that show + * why the current aggregated health state was returned by Health Manager. + * @member {object} [healthStatistics] Shows the health statistics for all + * children types of the queried entity. * @member {array} [healthStatistics.healthStateCountList] 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. @@ -130,7 +193,8 @@ export interface EntityHealth { * aggregated health state and the service and deployed application health * states. * - * @member {string} [name] + * @member {string} [name] The name of the application, including the 'fabric:' + * URI scheme. * @member {array} [serviceHealthStates] Service health states as found in the * health store. * @member {array} [deployedApplicationHealthStates] Deployed application @@ -149,8 +213,10 @@ export interface ApplicationHealth extends EntityHealth { * Represents a health evaluation which describes the data and the algorithm * used by health manager to evaluate the health of an entity. * - * @member {string} [aggregatedHealthState] Possible values include: 'Invalid', - * 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [aggregatedHealthState] The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * @member {string} [description] Description of the health evaluation, which * represents a summary of the evaluation process. * @member {string} kind Polymorphic Discriminator @@ -167,9 +233,13 @@ export interface HealthEvaluation { * @constructor * Wrapper object for health evaluation. * - * @member {object} [healthEvaluation] - * @member {string} [healthEvaluation.aggregatedHealthState] Possible values - * include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {object} [healthEvaluation] Represents a health evaluation which + * describes the data and the algorithm used by health manager to evaluate the + * health of an entity. + * @member {string} [healthEvaluation.aggregatedHealthState] The health state + * of a Service Fabric entity such as Cluster, Node, Application, Service, + * Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', + * 'Error', 'Unknown' * @member {string} [healthEvaluation.description] Description of the health * evaluation, which represents a summary of the evaluation process. * @member {string} [healthEvaluation.kind] Polymorphic Discriminator @@ -186,8 +256,12 @@ export interface HealthEvaluationWrapper { * about the data and the algorithm used by the health store to evaluate * health. * - * @member {string} [applicationName] - * @member {array} [unhealthyEvaluations] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {array} [unhealthyEvaluations] 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. */ export interface ApplicationHealthEvaluation extends HealthEvaluation { applicationName?: string; @@ -258,7 +332,8 @@ export interface ServiceTypeHealthPolicy { * * @member {string} key The key of the service type health policy map item. * This is the name of the service type. - * @member {object} value + * @member {object} value The value of the service type health policy map item. + * This is the ServiceTypeHealthPolicy for this service type. * @member {number} [value.maxPercentUnhealthyPartitionsPerService] The maximum * allowed percentage of unhealthy partitions per service. Allowed values are * Byte values from zero to 100 @@ -324,7 +399,8 @@ export interface ServiceTypeHealthPolicyMapItem { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * . Default value: 0 . - * @member {object} [defaultServiceTypeHealthPolicy] + * @member {object} [defaultServiceTypeHealthPolicy] The health policy used by + * default to evaluate the health of a service type. * @member {number} * [defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] The * maximum allowed percentage of unhealthy partitions per service. Allowed @@ -365,7 +441,8 @@ export interface ServiceTypeHealthPolicyMapItem { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [serviceTypeHealthPolicyMap] + * @member {array} [serviceTypeHealthPolicyMap] The map with service type + * health policy per service type name. The map is empty by default. */ export interface ApplicationHealthPolicy { considerWarningAsError?: boolean; @@ -381,8 +458,10 @@ export interface ApplicationHealthPolicy { * Defines an item in ApplicationHealthPolicyMap. * * - * @member {string} key - * @member {object} value + * @member {string} key The key of the application health policy map item. This + * is the name of the application. + * @member {object} value The value of the application health policy map item. + * This is the ApplicationHealthPolicy for this application. * @member {boolean} [value.considerWarningAsError] Indicates whether warnings * are treated with the same severity as errors. * @member {number} [value.maxPercentUnhealthyDeployedApplications] The maximum @@ -396,7 +475,8 @@ export interface ApplicationHealthPolicy { * the cluster. * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. - * @member {object} [value.defaultServiceTypeHealthPolicy] + * @member {object} [value.defaultServiceTypeHealthPolicy] The health policy + * used by default to evaluate the health of a service type. * @member {number} * [value.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -437,7 +517,8 @@ export interface ApplicationHealthPolicy { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [value.serviceTypeHealthPolicyMap] + * @member {array} [value.serviceTypeHealthPolicyMap] The map with service type + * health policy per service type name. The map is empty by default. */ export interface ApplicationHealthPolicyMapItem { key: string; @@ -452,7 +533,9 @@ export interface ApplicationHealthPolicyMapItem { * application or one of its children entities. * * - * @member {array} [applicationHealthPolicyMap] + * @member {array} [applicationHealthPolicyMap] The wrapper that contains the + * map with application health policies used to evaluate specific applications + * in the cluster. */ export interface ApplicationHealthPolicies { applicationHealthPolicyMap?: ApplicationHealthPolicyMapItem[]; @@ -466,7 +549,8 @@ export interface ApplicationHealthPolicies { * application identifier and the aggregated health state. * * - * @member {string} [name] + * @member {string} [name] The name of the application, including the 'fabric:' + * URI scheme. */ export interface ApplicationHealthState extends EntityHealthState { name?: string; @@ -479,8 +563,9 @@ export interface ApplicationHealthState extends EntityHealthState { * A base type for the health state chunk of various entities in the cluster. * It contains the aggregated health state. * - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' */ export interface EntityHealthStateChunk { healthState?: string; @@ -496,7 +581,16 @@ export interface EntityHealthStateChunk { * state. * * - * @member {string} [replicaOrInstanceId] + * @member {string} [replicaOrInstanceId] 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. */ export interface ReplicaHealthStateChunk extends EntityHealthStateChunk { replicaOrInstanceId?: string; @@ -522,12 +616,14 @@ export interface ReplicaHealthStateChunkList { * Initializes a new instance of the PartitionHealthStateChunk class. * @constructor * Represents the health state chunk of a partition, which contains the - * partition id, its aggregated health state and any replicas that respect the + * partition ID, its aggregated health state and any replicas that respect the * filters in the cluster health chunk query description. * * - * @member {uuid} [partitionId] - * @member {object} [replicaHealthStateChunks] + * @member {uuid} [partitionId] The Id of the partition. + * @member {object} [replicaHealthStateChunks] The list of replica health state + * chunks belonging to the partition that respect the filters in the cluster + * health chunk query description. * @member {array} [replicaHealthStateChunks.items] The list of replica health * state chunks that respect the input filters in the chunk query. */ @@ -562,8 +658,11 @@ export interface PartitionHealthStateChunkList { * filters in the cluster health chunk query description. * * - * @member {string} [serviceName] - * @member {object} [partitionHealthStateChunks] + * @member {string} [serviceName] The name of the service whose health state + * chunk is provided in this object. + * @member {object} [partitionHealthStateChunks] The list of partition health + * state chunks belonging to the service that respect the filters in the + * cluster health chunk query description. * @member {array} [partitionHealthStateChunks.items] The list of partition * health state chunks that respect the input filters in the chunk query. */ @@ -596,8 +695,13 @@ export interface ServiceHealthStateChunkList { * state. * * - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] + * @member {string} [serviceManifestName] The name of the service manifest. + * @member {string} [servicePackageActivationId] 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. */ export interface DeployedServicePackageHealthStateChunk extends EntityHealthStateChunk { serviceManifestName?: string; @@ -632,7 +736,10 @@ export interface DeployedServicePackageHealthStateChunkList { * * @member {string} [nodeName] The name of node where the application is * deployed. - * @member {object} [deployedServicePackageHealthStateChunks] + * @member {object} [deployedServicePackageHealthStateChunks] 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. * @member {array} [deployedServicePackageHealthStateChunks.items] The list of * deployed service package health state chunks that respect the input filters * in the chunk query. @@ -668,12 +775,18 @@ export interface DeployedApplicationHealthStateChunkList { * that respect the filters in cluster health chunk query description. * * - * @member {string} [applicationName] - * @member {string} [applicationTypeName] - * @member {object} [serviceHealthStateChunks] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [applicationTypeName] The application type name as defined + * in the application manifest. + * @member {object} [serviceHealthStateChunks] The list of service health state + * chunks in the cluster that respect the filters in the cluster health chunk + * query description. * @member {array} [serviceHealthStateChunks.items] The list of service health * state chunks that respect the input filters in the chunk query. - * @member {object} [deployedApplicationHealthStateChunks] + * @member {object} [deployedApplicationHealthStateChunks] The list of deployed + * application health state chunks in the cluster that respect the filters in + * the cluster health chunk query description. * @member {array} [deployedApplicationHealthStateChunks.items] The list of * deployed application health state chunks that respect the input filters in * the chunk query. @@ -731,7 +844,7 @@ export interface ApplicationHealthStateChunkList extends EntityHealthStateChunkL * * * @member {string} [replicaOrInstanceIdFilter] Id of the stateful service - * replica or stateles service instance that matches the filter. The filter is + * 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. @@ -746,8 +859,8 @@ export interface ApplicationHealthStateChunkList extends EntityHealthStateChunkL * 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 + * 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. @@ -799,8 +912,8 @@ export interface ReplicaHealthStateFilter { * 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, + * 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. @@ -893,7 +1006,7 @@ export interface PartitionHealthStateFilter { * 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. + * its partition ID. */ export interface ServiceHealthStateFilter { serviceNameFilter?: string; @@ -942,8 +1055,8 @@ export interface ServiceHealthStateFilter { * 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. + * 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 @@ -1142,17 +1255,31 @@ export interface ApplicationParameter { * @constructor * Information about a Service Fabric application. * - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [typeVersion] - * @member {string} [status] Possible values include: 'Invalid', 'Ready', - * 'Upgrading', 'Creating', 'Deleting', 'Failed' - * @member {array} [parameters] - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [applicationDefinitionKind] Possible values include: - * 'Invalid', 'ServiceFabricApplicationDescription', 'Compose' + * @member {string} [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. + * @member {string} [name] The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [typeVersion] The version of the application type as + * defined in the application manifest. + * @member {string} [status] The status of the application. + * . Possible values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', + * 'Deleting', 'Failed' + * @member {array} [parameters] List of application parameters with overridden + * values from their default values specified in the application manifest. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [applicationDefinitionKind] The mechanism used to define a + * Service Fabric application. + * . Possible values include: 'Invalid', 'ServiceFabricApplicationDescription', + * 'Compose' */ export interface ApplicationInfo { id?: string; @@ -1219,7 +1346,13 @@ export interface ApplicationMetricDescription { * @constructor * Load Information about a Service Fabric application. * - * @member {string} [id] + * @member {string} [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. * @member {number} [minimumNodes] The minimum number of nodes for this * application. * It is the number of nodes where Service Fabric will reserve Capacity in the @@ -1236,7 +1369,8 @@ export interface ApplicationMetricDescription { * is instantiated. * For applications that do not have application capacity defined this value * will be zero. - * @member {array} [applicationLoadMetricInformation] + * @member {array} [applicationLoadMetricInformation] List of application + * capacity metric description. */ export interface ApplicationLoadInfo { id?: string; @@ -1252,8 +1386,15 @@ export interface ApplicationLoadInfo { * @constructor * Information about the application name. * - * @member {string} [id] - * @member {string} [name] + * @member {string} [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. + * @member {string} [name] The name of the application, including the 'fabric:' + * URI scheme. */ export interface ApplicationNameInfo { id?: string; @@ -1272,7 +1413,9 @@ export interface ApplicationNameInfo { * percentage of unhealthy applications from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of applications from the health * store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ApplicationHealthEvaluation that impacted the aggregated health. */ export interface ApplicationsHealthEvaluation extends HealthEvaluation { maxPercentUnhealthyApplications?: number; @@ -1291,13 +1434,17 @@ export interface ApplicationsHealthEvaluation extends HealthEvaluation { * application of the included application type that impacted current * aggregated health state. * - * @member {string} [applicationTypeName] + * @member {string} [applicationTypeName] The application type name as defined + * in the application manifest. * @member {number} [maxPercentUnhealthyApplications] Maximum allowed * percentage of unhealthy applications for the application type, specified as * an entry in ApplicationTypeHealthPolicyMap. * @member {number} [totalCount] Total number of applications of the * application type found in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] 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. */ export interface ApplicationTypeApplicationsHealthEvaluation extends HealthEvaluation { applicationTypeName?: string; @@ -1331,14 +1478,21 @@ export interface ApplicationTypeHealthPolicyMapItem { * @constructor * Information about an application type. * - * @member {string} [name] - * @member {string} [version] - * @member {array} [defaultParameterList] - * @member {string} [status] Possible values include: 'Invalid', - * 'Provisioning', 'Available', 'Unprovisioning', 'Failed' - * @member {string} [statusDetails] - * @member {string} [applicationTypeDefinitionKind] Possible values include: - * 'Invalid', 'ServiceFabricApplicationPackage', 'Compose' + * @member {string} [name] The application type name as defined in the + * application manifest. + * @member {string} [version] The version of the application type as defined in + * the application manifest. + * @member {array} [defaultParameterList] List of application type parameters + * that can be overridden when creating or updating the application. + * @member {string} [status] The status of the application type. + * . Possible values include: 'Invalid', 'Provisioning', 'Available', + * 'Unprovisioning', 'Failed' + * @member {string} [statusDetails] Additional detailed information about the + * status of the application type. + * @member {string} [applicationTypeDefinitionKind] The mechanism used to + * define a Service Fabric application type. + * . Possible values include: 'Invalid', 'ServiceFabricApplicationPackage', + * 'Compose' */ export interface ApplicationTypeInfo { name?: string; @@ -1358,8 +1512,13 @@ export interface ApplicationTypeInfo { * single message. The next set of results can be obtained by executing the * same query with the continuation token provided in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of application type information. */ export interface PagedApplicationTypeInfoList { continuationToken?: string; @@ -1385,13 +1544,38 @@ export interface ApplicationTypeManifest { * @constructor * Describes the parameters for monitoring an upgrade in Monitored mode. * - * @member {string} [failureAction] Possible values include: 'Invalid', - * 'Rollback', 'Manual' - * @member {string} [healthCheckWaitDurationInMilliseconds] - * @member {string} [healthCheckStableDurationInMilliseconds] - * @member {string} [healthCheckRetryTimeoutInMilliseconds] - * @member {string} [upgradeTimeoutInMilliseconds] - * @member {string} [upgradeDomainTimeoutInMilliseconds] + * @member {string} [failureAction] 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' + * @member {string} [healthCheckWaitDurationInMilliseconds] 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. + * @member {string} [healthCheckStableDurationInMilliseconds] 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. + * @member {string} [healthCheckRetryTimeoutInMilliseconds] 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. + * @member {string} [upgradeTimeoutInMilliseconds] 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. + * @member {string} [upgradeDomainTimeoutInMilliseconds] 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. */ export interface MonitoringPolicyDescription { failureAction?: string; @@ -1416,25 +1600,67 @@ export interface MonitoringPolicyDescription { * GetApplicationInfo query and then supply those values as Parameters in this * ApplicationUpgradeDescription. * - * @member {string} name - * @member {string} targetApplicationTypeVersion - * @member {array} parameters - * @member {string} upgradeKind Possible values include: 'Invalid', 'Rolling'. - * Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {string} name The name of the target application, including the + * 'fabric:' URI scheme. + * @member {string} targetApplicationTypeVersion The target application type + * version (found in the application manifest) for the application upgrade. + * @member {array} parameters List of application parameters with overridden + * values from their default values specified in the application manifest. + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for monitoring + * an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} @@ -1450,6 +1676,7 @@ export interface MonitoringPolicyDescription { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -1490,7 +1717,9 @@ export interface MonitoringPolicyDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The map + * with service type health policy per service type name. The map is empty by + * default. */ export interface ApplicationUpgradeDescription { name: string; @@ -1510,9 +1739,9 @@ export interface ApplicationUpgradeDescription { * @constructor * Information about an upgrade domain. * - * @member {string} [name] - * @member {string} [state] Possible values include: 'Invalid', 'Pending', - * 'InProgress', 'Completed' + * @member {string} [name] The name of the upgrade domain + * @member {string} [state] The state of the upgrade domain. Possible values + * include: 'Invalid', 'Pending', 'InProgress', 'Completed' */ export interface UpgradeDomainInfo { name?: string; @@ -1541,7 +1770,9 @@ export interface SafetyCheck { * service fabric before continuing with the operations. These checks ensure * the availability of the service and the reliability of the state. * - * @member {object} [safetyCheck] + * @member {object} [safetyCheck] 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. * @member {string} [safetyCheck.kind] Polymorphic Discriminator */ export interface SafetyCheckWrapper { @@ -1554,10 +1785,11 @@ export interface SafetyCheckWrapper { * @constructor * Information about the upgrading node and its status * - * @member {string} [nodeName] - * @member {string} [upgradePhase] Possible values include: 'Invalid', - * 'PreUpgradeSafetyCheck', 'Upgrading', 'PostUpgradeSafetyCheck' - * @member {array} [pendingSafetyChecks] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {string} [upgradePhase] The state of the upgrading node. Possible + * values include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + * 'PostUpgradeSafetyCheck' + * @member {array} [pendingSafetyChecks] List of pending safety checks */ export interface NodeUpgradeProgressInfo { nodeName?: string; @@ -1571,8 +1803,9 @@ export interface NodeUpgradeProgressInfo { * @constructor * Information about the current in-progress upgrade domain. * - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and their + * statuses */ export interface CurrentUpgradeDomainProgressInfo { domainName?: string; @@ -1586,8 +1819,9 @@ export interface CurrentUpgradeDomainProgressInfo { * Information about the upgrade domain progress at the time of upgrade * failure. * - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and their + * statuses */ export interface FailureUpgradeDomainProgressInfo { domainName?: string; @@ -1600,41 +1834,101 @@ export interface FailureUpgradeDomainProgressInfo { * @constructor * Describes the parameters for an application upgrade. * - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [targetApplicationTypeVersion] - * @member {array} [upgradeDomains] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', - * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' - * @member {string} [nextUpgradeDomain] - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {object} [upgradeDescription] - * @member {string} [upgradeDescription.name] - * @member {string} [upgradeDescription.targetApplicationTypeVersion] - * @member {array} [upgradeDescription.parameters] - * @member {string} [upgradeDescription.upgradeKind] Possible values include: - * 'Invalid', 'Rolling' - * @member {string} [upgradeDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {string} [name] The name of the target application, including the + * 'fabric:' URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [targetApplicationTypeVersion] The target application type + * version (found in the application manifest) for the application upgrade. + * @member {array} [upgradeDomains] List of upgrade domains and their statuses. + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + * 'RollingForwardPending', 'RollingForwardInProgress', + * 'RollingForwardCompleted', 'Failed' + * @member {string} [nextUpgradeDomain] The name of the next upgrade domain to + * be processed. + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {object} [upgradeDescription] Describes the parameters for an + * application upgrade. Please note that upgrade description replaces the + * existing application description. This means that if the parameters are not + * specified, the existing parameters on the applications will be overwritten + * with the empty parameters list. This would results in application using the + * default value of the parameters from the application manifest. If you do not + * want to change any existing parameter values, please get the application + * parameters first using the GetApplicationInfo query and then supply those + * values as Parameters in this ApplicationUpgradeDescription. + * @member {string} [upgradeDescription.name] The name of the target + * application, including the 'fabric:' URI scheme. + * @member {string} [upgradeDescription.targetApplicationTypeVersion] The + * target application type version (found in the application manifest) for the + * application upgrade. + * @member {array} [upgradeDescription.parameters] List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * @member {string} [upgradeDescription.upgradeKind] The kind of upgrade out of + * the following possible values. Possible values include: 'Invalid', 'Rolling' + * @member {string} [upgradeDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * @member {number} [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [upgradeDescription.forceRestart] - * @member {object} [upgradeDescription.monitoringPolicy] - * @member {string} [upgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {boolean} [upgradeDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). + * @member {object} [upgradeDescription.monitoringPolicy] Describes the + * parameters for monitoring an upgrade in Monitored mode. + * @member {string} [upgradeDescription.monitoringPolicy.failureAction] 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' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [upgradeDescription.applicationHealthPolicy] + * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [upgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. * @member {boolean} * [upgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -1652,6 +1946,7 @@ export interface FailureUpgradeDomainProgressInfo { * Default percentage is zero. * @member {object} * [upgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * @member {number} * [upgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -1693,24 +1988,35 @@ export interface FailureUpgradeDomainProgressInfo { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * @member {array} - * [upgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * [upgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] The + * map with service type health policy per service type name. The map is empty + * by default. * @member {string} [upgradeDurationInMilliseconds] The estimated total amount * of time spent processing the overall upgrade. * @member {string} [upgradeDomainDurationInMilliseconds] The estimated total * amount of time spent processing the current upgrade domain. - * @member {array} [unhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] - * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] + * @member {array} [unhealthyEvaluations] List of health evaluations that + * resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain + * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] List + * of upgrading nodes and their statuses * @member {string} [startTimestampUtc] The estimated UTC datetime when the * upgrade started. * @member {string} [failureTimestampUtc] The estimated UTC datetime when the * upgrade failed and FailureAction was executed. - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] Information about the + * upgrade domain progress at the time of upgrade failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of the + * upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] + * List of upgrading nodes and their statuses * @member {string} [upgradeStatusDetails] Additional detailed information * about the status of the pending upgrade. */ @@ -1747,6 +2053,16 @@ export interface ClusterConfiguration { clusterConfiguration?: string; } +/** + * @class + * Initializes a new instance of the ClusterEvent class. + * @constructor + * Represents the base for all Cluster Events. + * + */ +export interface ClusterEvent extends FabricEvent { +} + /** * @class * Initializes a new instance of the NodeId class. @@ -1767,8 +2083,9 @@ export interface NodeId { * Represents the health state of a node, which contains the node identifier * and its aggregated health state. * - * @member {string} [name] - * @member {object} [id] + * @member {string} [name] The name of a Service Fabric node. + * @member {object} [id] An internal ID used by Service Fabric to uniquely + * identify a node. Node Id is deterministically generated from node name. * @member {string} [id.id] Value of the node Id. This is a 128 bit integer. */ export interface NodeHealthState extends EntityHealthState { @@ -1804,7 +2121,7 @@ export interface ClusterHealth extends EntityHealth { * and its aggregated health state. * * - * @member {string} [nodeName] + * @member {string} [nodeName] The name of a Service Fabric node. */ export interface NodeHealthStateChunk extends EntityHealthStateChunk { nodeName?: string; @@ -1835,12 +2152,21 @@ export interface NodeHealthStateChunkList extends EntityHealthStateChunkList { * respect the input filter. * * - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {object} [nodeHealthStateChunks] + * @member {string} [healthState] 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' + * @member {object} [nodeHealthStateChunks] The list of node health state + * chunks in the cluster that respect the filters in the cluster health chunk + * query description. * @member {array} [nodeHealthStateChunks.items] The list of node health state * chunks that respect the input filters in the chunk query. - * @member {object} [applicationHealthStateChunks] + * @member {object} [applicationHealthStateChunks] The list of application + * health state chunks in the cluster that respect the filters in the cluster + * health chunk query description. * @member {array} [applicationHealthStateChunks.items] The list of application * health state chunks that respect the input filters in the chunk query. */ @@ -1941,7 +2267,28 @@ export interface NodeHealthStateFilter { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * . Default value: 0 . - * @member {array} [applicationTypeHealthPolicyMap] + * @member {array} [applicationTypeHealthPolicyMap] 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. */ export interface ClusterHealthPolicy { considerWarningAsError?: boolean; @@ -1976,7 +2323,8 @@ export interface ClusterHealthPolicy { * 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. - * @member {object} [clusterHealthPolicy] + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -2009,9 +2357,35 @@ export interface ClusterHealthPolicy { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [applicationHealthPolicies] - * @member {array} [applicationHealthPolicies.applicationHealthPolicyMap] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {object} [applicationHealthPolicies] Defines the application health + * policy map used to evaluate the health of an application or one of its + * children entities. + * @member {array} [applicationHealthPolicies.applicationHealthPolicyMap] The + * wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ export interface ClusterHealthChunkQueryDescription { nodeFilters?: NodeHealthStateFilter[]; @@ -2026,8 +2400,17 @@ export interface ClusterHealthChunkQueryDescription { * @constructor * Health policies to evaluate cluster health. * - * @member {array} [applicationHealthPolicyMap] - * @member {object} [clusterHealthPolicy] + * @member {array} [applicationHealthPolicyMap] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -2060,7 +2443,29 @@ export interface ClusterHealthChunkQueryDescription { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. */ export interface ClusterHealthPolicies { applicationHealthPolicyMap?: ApplicationHealthPolicyMapItem[]; @@ -2079,6 +2484,72 @@ export interface ClusterManifest { manifest?: string; } +/** + * @class + * Initializes a new instance of the ContainerApiRequestBody class. + * @constructor + * parameters for making container API call. + * + * @member {string} [httpVerb] HTTP verb of container REST API, defaults to + * "GET" + * @member {string} uriPath URI path of container REST API + * @member {string} [contentType] Content type of container REST API request, + * defaults to "application/json" + * @member {string} [body] HTTP request body of container REST API + */ +export interface ContainerApiRequestBody { + httpVerb?: string; + uriPath: string; + contentType?: string; + body?: string; +} + +/** + * @class + * Initializes a new instance of the ContainerApiResult class. + * @constructor + * Container API result. + * + * @member {number} status HTTP status code returned by the target container + * API + * @member {string} [contentType] HTTP content type + * @member {string} [contentEncoding] HTTP content encoding + * @member {string} [body] container API result body + */ +export interface ContainerApiResult { + status: number; + contentType?: string; + contentEncoding?: string; + body?: string; +} + +/** + * @class + * Initializes a new instance of the ContainerApiResponse class. + * @constructor + * Response body that wraps container API result. + * + * @member {object} containerApiResult Container API result. + * @member {number} [containerApiResult.status] HTTP status code returned by + * the target container API + * @member {string} [containerApiResult.contentType] HTTP content type + * @member {string} [containerApiResult.contentEncoding] HTTP content encoding + * @member {string} [containerApiResult.body] container API result body + */ +export interface ContainerApiResponse { + containerApiResult: ContainerApiResult; +} + +/** + * @class + * Initializes a new instance of the ContainerInstanceEvent class. + * @constructor + * Represents the base for all Container Events. + * + */ +export interface ContainerInstanceEvent extends FabricEvent { +} + /** * @class * Initializes a new instance of the DeactivationIntentDescription class. @@ -2087,11 +2558,6 @@ export interface ClusterManifest { * * @member {string} [deactivationIntent] Describes the intent or reason for * deactivating the node. The possible values are following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. * . Possible values include: 'Pause', 'Restart', 'RemoveData' */ export interface DeactivationIntentDescription { @@ -2115,7 +2581,10 @@ export interface DeactivationIntentDescription { * @member {number} [maxPercentDeltaUnhealthyNodes] Maximum allowed percentage * of delta unhealthy nodes from the ClusterUpgradeHealthPolicy. * @member {number} [totalCount] Total number of nodes in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. + * Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated + * health. */ export interface DeltaNodesCheckHealthEvaluation extends HealthEvaluation { baselineErrorCount?: number; @@ -2132,10 +2601,18 @@ export interface DeltaNodesCheckHealthEvaluation extends HealthEvaluation { * Represents the health state of a deployed service package, containing the * entity identifier and the aggregated health state. * - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] + * @member {string} [nodeName] Name of the node on which the service package is + * deployed. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] Name of the manifest describing the + * service package. + * @member {string} [servicePackageActivationId] 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. */ export interface DeployedServicePackageHealthState extends EntityHealthState { nodeName?: string; @@ -2151,9 +2628,13 @@ export interface DeployedServicePackageHealthState extends EntityHealthState { * Information about the health of an application deployed on a Service Fabric * node. * - * @member {string} [name] - * @member {string} [nodeName] - * @member {array} [deployedServicePackageHealthStates] + * @member {string} [name] Name of the application deployed on the node whose + * health information is described by this object. + * @member {string} [nodeName] Name of the node where this application is + * deployed. + * @member {array} [deployedServicePackageHealthStates] Deployed service + * package health states for the current deployed application as found in the + * health store. */ export interface DeployedApplicationHealth extends EntityHealth { name?: string; @@ -2170,9 +2651,14 @@ export interface DeployedApplicationHealth extends EntityHealth { * evaluate health. * * - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] Name of the node where the application is + * deployed to. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {array} [unhealthyEvaluations] 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. */ export interface DeployedApplicationHealthEvaluation extends HealthEvaluation { nodeName?: string; @@ -2186,11 +2672,21 @@ export interface DeployedApplicationHealthEvaluation extends HealthEvaluation { * @constructor * Information about application deployed on the node. * - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] - * @member {string} [status] Possible values include: 'Invalid', 'Downloading', - * 'Activating', 'Active', 'Upgrading', 'Deactivating' + * @member {string} [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. + * @member {string} [name] The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} [typeName] The application type name as defined in the + * application manifest. + * @member {string} [status] The status of the application deployed on the + * node. Following are the possible values. + * . Possible values include: 'Invalid', 'Downloading', 'Activating', 'Active', + * 'Upgrading', 'Deactivating' * @member {string} [workDirectory] The work directory of the application on * the node. The work directory can be used to store application data. * @member {string} [logDirectory] The log directory of the application on the @@ -2198,6 +2694,9 @@ export interface DeployedApplicationHealthEvaluation extends HealthEvaluation { * @member {string} [tempDirectory] 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. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' */ export interface DeployedApplicationInfo { id?: string; @@ -2207,6 +2706,7 @@ export interface DeployedApplicationInfo { workDirectory?: string; logDirectory?: string; tempDirectory?: string; + healthState?: string; } /** @@ -2225,7 +2725,9 @@ export interface DeployedApplicationInfo { * ApplicationHealthPolicy. * @member {number} [totalCount] Total number of deployed applications of the * application in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * DeployedApplicationHealthEvaluation that impacted the aggregated health. */ export interface DeployedApplicationsHealthEvaluation extends HealthEvaluation { maxPercentUnhealthyDeployedApplications?: number; @@ -2240,9 +2742,11 @@ export interface DeployedApplicationsHealthEvaluation extends HealthEvaluation { * Information about the health of a service package for a specific application * deployed on a Service Fabric node. * - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {string} [nodeName] + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] Name of the service manifest. + * @member {string} [nodeName] Name of the node where this service package is + * deployed. */ export interface DeployedServicePackageHealth extends EntityHealth { applicationName?: string; @@ -2259,10 +2763,13 @@ export interface DeployedServicePackageHealth extends EntityHealth { * evaluate health. The evaluation is returned only when the aggregated health * state is either Error or Warning. * - * @member {string} [nodeName] - * @member {string} [applicationName] - * @member {string} [serviceManifestName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [serviceManifestName] The name of the service manifest. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state. The type of the unhealthy + * evaluations can be EventHealthEvaluation. */ export interface DeployedServicePackageHealthEvaluation extends HealthEvaluation { nodeName?: string; @@ -2283,7 +2790,9 @@ export interface DeployedServicePackageHealthEvaluation extends HealthEvaluation * * @member {number} [totalCount] Total number of deployed service packages of * the deployed application in the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * DeployedServicePackageHealthEvaluation that impacted the aggregated health. */ export interface DeployedServicePackagesHealthEvaluation extends HealthEvaluation { totalCount?: number; @@ -2296,19 +2805,33 @@ export interface DeployedServicePackagesHealthEvaluation extends HealthEvaluatio * @constructor * Information about a Service Fabric service replica deployed on a node. * - * @member {string} [serviceName] - * @member {string} [serviceTypeName] - * @member {string} [serviceManifestName] - * @member {string} [codePackageName] - * @member {uuid} [partitionId] - * @member {string} [replicaStatus] Possible values include: 'Invalid', - * 'InBuild', 'Standby', 'Ready', 'Down', 'Dropped' + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {string} [serviceTypeName] Name of the service type as specified in + * the service manifest. + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. + * @member {string} [codePackageName] The name of the code package that hosts + * this replica. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for the + * lifetime of the service. If the same service was deleted and recreated the + * IDs of its partitions would be different. + * @member {string} [replicaStatus] The status of a replica of a service. + * Possible values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + * 'Dropped' * @member {string} [address] The last address returned by the replica in Open * or ChangeRole. - * @member {string} [servicePackageActivationId] - * @member {string} [hostProcessId] Host process id of the process that is + * @member {string} [servicePackageActivationId] 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. + * @member {string} [hostProcessId] 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. + * containers this host process ID will be from different kernel. * @member {string} serviceKind Polymorphic Discriminator */ export interface DeployedServiceReplicaInfo { @@ -2331,12 +2854,17 @@ export interface DeployedServiceReplicaInfo { * Information about current reconfiguration like phase, type, previous * configuration role of replica and reconfiguration start date time. * - * @member {string} [previousConfigurationRole] Possible values include: - * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {string} [reconfigurationPhase] Possible values include: 'Unknown', - * 'None', 'Phase0', 'Phase1', 'Phase2', 'Phase3', 'Phase4', 'AbortPhaseZero' - * @member {string} [reconfigurationType] Possible values include: 'Unknown', - * 'SwapPrimary', 'Failover', 'Other' + * @member {string} [previousConfigurationRole] Replica role before + * reconfiguration started. Possible values include: 'Unknown', 'None', + * 'Primary', 'IdleSecondary', 'ActiveSecondary' + * @member {string} [reconfigurationPhase] 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' + * @member {string} [reconfigurationType] Type of current ongoing + * reconfiguration. If no reconfiguration is taking place then this value will + * be "None". Possible values include: 'Unknown', 'SwapPrimary', 'Failover', + * 'Other' * @member {date} [reconfigurationStartTimeUtc] Start time (in UTC) of the * ongoing reconfiguration. If no reconfiguration is taking place then this * value will be zero date-time. @@ -2354,18 +2882,30 @@ export interface ReconfigurationInformation { * @constructor * Information about a stateful service replica deployed on a node. * - * @member {string} [replicaId] - * @member {string} [replicaRole] Possible values include: 'Unknown', 'None', - * 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {object} [reconfigurationInformation] - * @member {string} [reconfigurationInformation.previousConfigurationRole] + * @member {string} [replicaId] 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. + * @member {string} [replicaRole] The role of a replica of a stateful service. * Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', * 'ActiveSecondary' - * @member {string} [reconfigurationInformation.reconfigurationPhase] Possible - * values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', 'Phase3', - * 'Phase4', 'AbortPhaseZero' - * @member {string} [reconfigurationInformation.reconfigurationType] Possible - * values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + * @member {object} [reconfigurationInformation] Information about current + * reconfiguration like phase, type, previous configuration role of replica and + * reconfiguration start date time. + * @member {string} [reconfigurationInformation.previousConfigurationRole] + * Replica role before reconfiguration started. Possible values include: + * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' + * @member {string} [reconfigurationInformation.reconfigurationPhase] 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' + * @member {string} [reconfigurationInformation.reconfigurationType] Type of + * current ongoing reconfiguration. If no reconfiguration is taking place then + * this value will be "None". Possible values include: 'Unknown', + * 'SwapPrimary', 'Failover', 'Other' * @member {date} [reconfigurationInformation.reconfigurationStartTimeUtc] * Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration is * taking place then this value will be zero date-time. @@ -2382,7 +2922,11 @@ export interface DeployedStatefulServiceReplicaInfo extends DeployedServiceRepli * @constructor * Information about a stateless service instance deployed on a node. * - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ export interface DeployedStatelessServiceInstanceInfo extends DeployedServiceReplicaInfo { instanceId?: string; @@ -2413,11 +2957,12 @@ export interface DeployedStatelessServiceInstanceInfo extends DeployedServiceRep * * Together with the SourceId, the property uniquely identifies the health * information. - * @member {string} healthState Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * @member {string} healthState The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {moment.duration} [timeToLiveInMilliSeconds] The duration for which - * this health report is valid. This field is using ISO8601 format for - * specifying the duration. + * 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. @@ -2445,7 +2990,7 @@ export interface DeployedStatelessServiceInstanceInfo extends DeployedServiceRep * when a report is added. * @member {boolean} [removeWhenExpired] Value that indicates whether the * report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -2551,10 +3096,12 @@ export interface HealthStateCount { * @constructor * Represents health state count for entities of the specified entity kind. * - * @member {string} [entityKind] Possible values include: 'Invalid', 'Node', - * 'Partition', 'Service', 'Application', 'Replica', 'DeployedApplication', + * @member {string} [entityKind] The entity kind for which health states are + * evaluated. Possible values include: 'Invalid', 'Node', 'Partition', + * 'Service', 'Application', 'Replica', 'DeployedApplication', * 'DeployedServicePackage', 'Cluster' - * @member {object} [healthStateCount] + * @member {object} [healthStateCount] The health state count for the entities + * of the specified kind. * @member {number} [healthStateCount.okCount] The number of health entities * with aggregated health state Ok. * @member {number} [healthStateCount.warningCount] The number of health @@ -2626,7 +3173,9 @@ export interface Epoch { * @member {boolean} [considerWarningAsError] Indicates whether warnings are * treated with the same severity as errors. The field is specified in the * health policy used to evaluate the entity. - * @member {object} [unhealthyEvent] + * @member {object} [unhealthyEvent] Represents health information reported on + * a health entity, such as cluster, application or node, with additional + * metadata added by the Health Manager. * @member {boolean} [unhealthyEvent.isExpired] Returns true if the health * event is expired, otherwise false. * @member {date} [unhealthyEvent.sourceUtcTimestamp] The date and time when @@ -2705,9 +3254,110 @@ export interface FabricConfigVersionInfo { * @constructor * Error object containing error code and error message. * - * @member {string} code Possible values include: - * 'FABRIC_E_INVALID_PARTITION_KEY', 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', - * 'FABRIC_E_INVALID_ADDRESS', 'FABRIC_E_APPLICATION_NOT_UPGRADING', + * @member {string} code 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" + * + * - 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" + * + * - 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', @@ -2744,7 +3394,15 @@ export interface FabricConfigVersionInfo { * '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' + * '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' * @member {string} [message] Error message. */ export interface FabricErrorError { @@ -2761,10 +3419,111 @@ export interface FabricErrorError { * Service Fabric API operations that are not successful. * * - * @member {object} error - * @member {string} [error.code] Possible values include: - * 'FABRIC_E_INVALID_PARTITION_KEY', 'FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR', - * 'FABRIC_E_INVALID_ADDRESS', 'FABRIC_E_APPLICATION_NOT_UPGRADING', + * @member {object} error Error object containing error code and error message. + * @member {string} [error.code] 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" + * + * - 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" + * + * - 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', @@ -2801,7 +3560,15 @@ export interface FabricErrorError { * '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' + * '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' * @member {string} [error.message] Error message. */ export interface FabricError { @@ -2814,9 +3581,10 @@ export interface FabricError { * @constructor * Information about a standalone cluster configuration upgrade status. * - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', - * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + * 'RollingForwardPending', 'RollingForwardInProgress', + * 'RollingForwardCompleted', 'Failed' * @member {number} [progressStatus] The cluster manifest version. * @member {string} [configVersion] The cluster configuration version. * @member {string} [details] The cluster upgrade status details. @@ -2835,7 +3603,11 @@ export interface ClusterConfigurationUpgradeStatusInfo { * Information about the partition identity, partitioning scheme and keys * supported by it. * - * @member {uuid} [id] + * @member {uuid} [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. * @member {string} servicePartitionKind Polymorphic Discriminator */ export interface PartitionInformation { @@ -2880,8 +3652,9 @@ export interface NamedPartitionInformation extends PartitionInformation { * Identity of the task related to deactivation operation on the node. * * @member {string} [id] Value of the task id. - * @member {string} [nodeDeactivationTaskType] Possible values include: - * 'Invalid', 'Infrastructure', 'Repair', 'Client' + * @member {string} [nodeDeactivationTaskType] The type of the task that + * performed the node deactivation. Following are the possible values. Possible + * values include: 'Invalid', 'Infrastructure', 'Repair', 'Client' */ export interface NodeDeactivationTaskId { id?: string; @@ -2894,12 +3667,16 @@ export interface NodeDeactivationTaskId { * @constructor * The task representing the deactivation operation on the node. * - * @member {object} [nodeDeactivationTaskId] + * @member {object} [nodeDeactivationTaskId] Identity of the task related to + * deactivation operation on the node. * @member {string} [nodeDeactivationTaskId.id] Value of the task id. - * @member {string} [nodeDeactivationTaskId.nodeDeactivationTaskType] Possible - * values include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - * @member {string} [nodeDeactivationIntent] Possible values include: - * 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + * @member {string} [nodeDeactivationTaskId.nodeDeactivationTaskType] The type + * of the task that performed the node deactivation. Following are the possible + * values. Possible values include: 'Invalid', 'Infrastructure', 'Repair', + * 'Client' + * @member {string} [nodeDeactivationIntent] The intent or the reason for + * deactivating the node. Following are the possible values for it. Possible + * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' */ export interface NodeDeactivationTask { nodeDeactivationTaskId?: NodeDeactivationTaskId; @@ -2913,12 +3690,15 @@ export interface NodeDeactivationTask { * Information about the node deactivation. This information is valid for a * node that is undergoing deactivation or has already been deactivated. * - * @member {string} [nodeDeactivationIntent] Possible values include: - * 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - * @member {string} [nodeDeactivationStatus] Possible values include: 'None', - * 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - * @member {array} [nodeDeactivationTask] - * @member {array} [pendingSafetyChecks] + * @member {string} [nodeDeactivationIntent] The intent or the reason for + * deactivating the node. Following are the possible values for it. Possible + * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + * @member {string} [nodeDeactivationStatus] The status of node deactivation + * operation. Following are the possible values. Possible values include: + * 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + * @member {array} [nodeDeactivationTask] List of tasks representing the + * deactivation operation on the node. + * @member {array} [pendingSafetyChecks] List of pending safety checks */ export interface NodeDeactivationInfo { nodeDeactivationIntent?: string; @@ -2927,13 +3707,26 @@ export interface NodeDeactivationInfo { pendingSafetyChecks?: SafetyCheckWrapper[]; } +/** + * @class + * Initializes a new instance of the NodeEvent class. + * @constructor + * Represents the base for all Node Events. + * + * @member {string} nodeName The name of a Service Fabric node. + */ +export interface NodeEvent extends FabricEvent { + nodeName: string; +} + /** * @class * Initializes a new instance of the NodeHealth class. * @constructor * Information about the health of a Service Fabric node. * - * @member {string} [name] + * @member {string} [name] Name of the node whose health information is + * described by this object. */ export interface NodeHealth extends EntityHealth { name?: string; @@ -2948,8 +3741,10 @@ export interface NodeHealth extends EntityHealth { * evaluation is returned only when the aggregated health state is either Error * or Warning. * - * @member {string} [nodeName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state of the node. The types of the + * unhealthy evaluations can be EventHealthEvaluation. */ export interface NodeHealthEvaluation extends HealthEvaluation { nodeName?: string; @@ -2962,7 +3757,7 @@ export interface NodeHealthEvaluation extends HealthEvaluation { * @constructor * Information about a node in Service Fabric cluster. * - * @member {string} [name] + * @member {string} [name] The name of a Service Fabric node. * @member {string} [ipAddressOrFQDN] The IP address or fully qualified domain * name of the node. * @member {string} [type] The type of the node. @@ -2970,31 +3765,41 @@ export interface NodeHealthEvaluation extends HealthEvaluation { * the node is running. * @member {string} [configVersion] The version of Service Fabric cluster * manifest that the node is using. - * @member {string} [nodeStatus] Possible values include: 'Invalid', 'Up', - * 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', 'Removed' + * @member {string} [nodeStatus] The status of the node. Possible values + * include: 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', + * 'Unknown', 'Removed' * @member {string} [nodeUpTimeInSeconds] Time in seconds since the node has - * been in NodeStatus Up. Value ero indicates that the node is not Up. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * been in NodeStatus Up. Value zero indicates that the node is not Up. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {boolean} [isSeedNode] 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. * @member {string} [upgradeDomain] The upgrade domain of the node. * @member {string} [faultDomain] The fault domain of the node. - * @member {object} [id] + * @member {object} [id] An internal ID used by Service Fabric to uniquely + * identify a node. Node Id is deterministically generated from node name. * @member {string} [id.id] Value of the node Id. This is a 128 bit integer. - * @member {string} [instanceId] The id representing the node instance. While - * the Id of the node is deterministically generated from the node name and + * @member {string} [instanceId] 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. - * @member {object} [nodeDeactivationInfo] - * @member {string} [nodeDeactivationInfo.nodeDeactivationIntent] Possible - * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - * @member {string} [nodeDeactivationInfo.nodeDeactivationStatus] Possible + * @member {object} [nodeDeactivationInfo] Information about the node + * deactivation. This information is valid for a node that is undergoing + * deactivation or has already been deactivated. + * @member {string} [nodeDeactivationInfo.nodeDeactivationIntent] The intent or + * the reason for deactivating the node. Following are the possible values for + * it. Possible values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', + * 'RemoveNode' + * @member {string} [nodeDeactivationInfo.nodeDeactivationStatus] The status of + * node deactivation operation. Following are the possible values. Possible * values include: 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', * 'Completed' - * @member {array} [nodeDeactivationInfo.nodeDeactivationTask] - * @member {array} [nodeDeactivationInfo.pendingSafetyChecks] + * @member {array} [nodeDeactivationInfo.nodeDeactivationTask] List of tasks + * representing the deactivation operation on the node. + * @member {array} [nodeDeactivationInfo.pendingSafetyChecks] List of pending + * safety checks * @member {boolean} [isStopped] Indicates if the node is stopped by calling * stop node API or not. Returns true if the node is stopped, otherwise false. * @member {string} [nodeDownTimeInSeconds] Time in seconds since the node has @@ -3062,7 +3867,8 @@ export interface NodeLoadMetricInformation { * Information about load on a Service Fabric node. It holds a summary of all * metrics and their load on a node. * - * @member {string} [nodeName] + * @member {string} [nodeName] Name of the node for which the load information + * is provided by this object. * @member {array} [nodeLoadMetricInformation] List that contains metrics and * their load information on this node. */ @@ -3084,7 +3890,9 @@ export interface NodeLoadInfo { * unhealthy nodes from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of nodes found in the health * store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ export interface NodesHealthEvaluation extends HealthEvaluation { maxPercentUnhealthyNodes?: number; @@ -3101,14 +3909,43 @@ export interface NodesHealthEvaluation extends HealthEvaluation { * obtained by executing the same query with the continuation token provided in * this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of application information. */ export interface PagedApplicationInfoList { continuationToken?: string; items?: ApplicationInfo[]; } +/** + * @class + * Initializes a new instance of the PagedDeployedApplicationInfoList class. + * @constructor + * 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. + * + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of deployed application information. + */ +export interface PagedDeployedApplicationInfoList { + continuationToken?: string; + items?: DeployedApplicationInfo[]; +} + /** * @class * Initializes a new instance of the PagedNodeInfoList class. @@ -3117,8 +3954,13 @@ export interface PagedApplicationInfoList { * cannot fit in a single message. The next set of results can be obtained by * executing the same query with the continuation token provided in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of node information. */ export interface PagedNodeInfoList { continuationToken?: string; @@ -3131,12 +3973,19 @@ export interface PagedNodeInfoList { * @constructor * Information about a partition of a Service Fabric service. * - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [partitionStatus] Possible values include: 'Invalid', - * 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting' - * @member {object} [partitionInformation] - * @member {uuid} [partitionInformation.id] + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [partitionStatus] The status of the service fabric service + * partition. Possible values include: 'Invalid', 'Ready', 'NotReady', + * 'InQuorumLoss', 'Reconfiguring', 'Deleting' + * @member {object} [partitionInformation] Information about the partition + * identity, partitioning scheme and keys supported by it. + * @member {uuid} [partitionInformation.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. * @member {string} [partitionInformation.servicePartitionKind] Polymorphic * Discriminator * @member {string} serviceKind Polymorphic Discriminator @@ -3157,8 +4006,13 @@ export interface ServicePartitionInfo { * can be obtained by executing the same query with the continuation token * provided in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of service partition information. */ export interface PagedServicePartitionInfoList { continuationToken?: string; @@ -3172,11 +4026,13 @@ export interface PagedServicePartitionInfoList { * Information about the identity, status, health, node name, uptime, and other * details about the replica. * - * @member {string} [replicaStatus] Possible values include: 'Invalid', - * 'InBuild', 'Standby', 'Ready', 'Down', 'Dropped' - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [nodeName] + * @member {string} [replicaStatus] The status of a replica of a service. + * Possible values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + * 'Dropped' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [nodeName] The name of a Service Fabric node. * @member {string} [address] The address the replica is listening on. * @member {string} [lastInBuildDurationInSeconds] The last in build duration * of the replica in seconds. @@ -3200,8 +4056,13 @@ export interface ReplicaInfo { * results can be obtained by executing the same query with the continuation * token provided in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of replica information. */ export interface PagedReplicaInfoList { continuationToken?: string; @@ -3214,14 +4075,24 @@ export interface PagedReplicaInfoList { * @constructor * Information about a Service Fabric service. * - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] + * @member {string} [id] The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + * @member {string} [name] The full name of the service with 'fabric:' URI + * scheme. + * @member {string} [typeName] Name of the service type as specified in the + * service manifest. * @member {string} [manifestVersion] The version of the service manifest. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [serviceStatus] Possible values include: 'Unknown', - * 'Active', 'Upgrading', 'Deleting', 'Creating', 'Failed' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [serviceStatus] The status of the application. Possible + * values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + * 'Failed' * @member {boolean} [isServiceGroup] Whether the service is in a service * group. * @member {string} serviceKind Polymorphic Discriminator @@ -3246,14 +4117,49 @@ export interface ServiceInfo { * results can be obtained by executing the same query with the continuation * token provided in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of service information. */ export interface PagedServiceInfoList { continuationToken?: string; items?: ServiceInfo[]; } +/** + * @class + * Initializes a new instance of the PartitionEvent class. + * @constructor + * Represents the base for all Partition Events. + * + * @member {uuid} partitionId An internal ID used by Service Fabric to uniquely + * identify a partition. This is a randomly generated GUID when the service was + * created. The partition ID is unique and does not change for the lifetime of + * the service. If the same service was deleted and recreated the IDs of its + * partitions would be different. + */ +export interface PartitionEvent extends FabricEvent { + partitionId: string; +} + +/** + * @class + * Initializes a new instance of the PartitionAnalysisEvent class. + * @constructor + * Represents the base for all Partition Analysis Events. + * + * @member {object} metadata Metadata about an Analysis Event. + * @member {moment.duration} [metadata.delay] The analysis delay. + * @member {moment.duration} [metadata.duration] The duration of analysis. + */ +export interface PartitionAnalysisEvent extends PartitionEvent { + metadata: AnalysisEventMetadata; +} + /** * @class * Initializes a new instance of the ReplicaHealthState class. @@ -3261,7 +4167,8 @@ export interface PagedServiceInfoList { * Represents a base class for stateful service replica or stateless service * instance health state. * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] The ID of the partition to which this replica + * belongs. * @member {string} serviceKind Polymorphic Discriminator */ export interface ReplicaHealthState extends EntityHealthState { @@ -3275,7 +4182,8 @@ export interface ReplicaHealthState extends EntityHealthState { * @constructor * Information about the health of a Service Fabric partition. * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] ID of the partition whose health information is + * described by this object. * @member {array} [replicaHealthStates] The list of replica health states * associated with the partition. */ @@ -3293,8 +4201,12 @@ export interface PartitionHealth extends EntityHealth { * evaluation is returned only when the aggregated health state is either Error * or Warning. * - * @member {uuid} [partitionId] - * @member {array} [unhealthyEvaluations] + * @member {uuid} [partitionId] Id of the partition whose health evaluation is + * described by this object. + * @member {array} [unhealthyEvaluations] 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. */ export interface PartitionHealthEvaluation extends HealthEvaluation { partitionId?: string; @@ -3308,7 +4220,8 @@ export interface PartitionHealthEvaluation extends HealthEvaluation { * Represents the health state of a partition, which contains the partition * identifier and its aggregated health state. * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition whose health state is + * described by this object. */ export interface PartitionHealthState extends EntityHealthState { partitionId?: string; @@ -3328,6 +4241,71 @@ export interface ProvisionFabricDescription { clusterManifestFilePath?: string; } +/** + * @class + * Initializes a new instance of the ProvisionApplicationTypeDescriptionBase class. + * @constructor + * 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. + * + * @member {boolean} async 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. + * @member {string} kind Polymorphic Discriminator + */ +export interface ProvisionApplicationTypeDescriptionBase { + async: boolean; + kind: string; +} + +/** + * @class + * Initializes a new instance of the ProvisionApplicationTypeDescription class. + * @constructor + * Describes the operation to register or provision an application type using + * an application package uploaded to the Service Fabric image store. + * + * @member {string} applicationTypeBuildPath The relative path for the + * application package in the image store specified during the prior upload + * operation. + * @member {string} [applicationPackageCleanupPolicy] 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' + */ +export interface ProvisionApplicationTypeDescription extends ProvisionApplicationTypeDescriptionBase { + applicationTypeBuildPath: string; + applicationPackageCleanupPolicy?: string; +} + +/** + * @class + * Initializes a new instance of the ExternalStoreProvisionApplicationTypeDescription class. + * @constructor + * 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. + * + * @member {string} applicationPackageDownloadUri 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. + * @member {string} applicationTypeName The application type name represents + * the name of the application type found in the application manifest. + * @member {string} applicationTypeVersion The application type version + * represents the version of the application type found in the application + * manifest. + */ +export interface ExternalStoreProvisionApplicationTypeDescription extends ProvisionApplicationTypeDescriptionBase { + applicationPackageDownloadUri: string; + applicationTypeName: string; + applicationTypeVersion: string; +} + /** * @class * Initializes a new instance of the UnprovisionFabricDescription class. @@ -3391,22 +4369,61 @@ export interface ClusterUpgradeHealthPolicyObject { * * @member {string} [codeVersion] The cluster code version. * @member {string} [configVersion] The cluster configuration version. - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for monitoring + * an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -3439,11 +4456,34 @@ export interface ClusterUpgradeHealthPolicyObject { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta * health evaluation rather than absolute health evaluation after completion of * each upgrade domain. - * @member {object} [clusterUpgradeHealthPolicy] + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] * The maximum allowed percentage of nodes health degradation allowed during * cluster upgrades. The delta is measured between the state of the nodes at @@ -3460,8 +4500,12 @@ export interface ClusterUpgradeHealthPolicyObject { * 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%. - * @member {object} [applicationHealthPolicyMap] - * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] + * @member {object} [applicationHealthPolicyMap] Defines the application health + * policy map used to evaluate the health of an application or one of its + * children entities. + * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] The + * wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ export interface StartClusterUpgradeDescription { codeVersion?: string; @@ -3484,18 +4528,51 @@ export interface StartClusterUpgradeDescription { * Describes the parameters for updating a rolling upgrade of application or * cluster. * - * @member {string} rollingUpgradeMode Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {boolean} [forceRestart] - * @member {number} [replicaSetCheckTimeoutInMilliseconds] - * @member {string} [failureAction] Possible values include: 'Invalid', - * 'Rollback', 'Manual' - * @member {string} [healthCheckWaitDurationInMilliseconds] - * @member {string} [healthCheckStableDurationInMilliseconds] - * @member {string} [healthCheckRetryTimeoutInMilliseconds] - * @member {string} [upgradeTimeoutInMilliseconds] - * @member {string} [upgradeDomainTimeoutInMilliseconds] + * @member {string} rollingUpgradeMode The mode used to monitor health during a + * rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {number} [replicaSetCheckTimeoutInMilliseconds] 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). + * @member {string} [failureAction] 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' + * @member {string} [healthCheckWaitDurationInMilliseconds] 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. + * @member {string} [healthCheckStableDurationInMilliseconds] 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. + * @member {string} [healthCheckRetryTimeoutInMilliseconds] 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. + * @member {string} [upgradeTimeoutInMilliseconds] 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. + * @member {string} [upgradeDomainTimeoutInMilliseconds] 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. */ export interface RollingUpgradeUpdateDescription { rollingUpgradeMode: string; @@ -3515,21 +4592,62 @@ export interface RollingUpgradeUpdateDescription { * @constructor * Parameters for updating a cluster upgrade. * - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling', 'Rolling_ForceRestart'. Default value: 'Rolling' . - * @member {object} [updateDescription] - * @member {string} [updateDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * @member {boolean} [updateDescription.forceRestart] + * @member {string} [upgradeKind] The type of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling', + * 'Rolling_ForceRestart'. Default value: 'Rolling' . + * @member {object} [updateDescription] Describes the parameters for updating a + * rolling upgrade of application or cluster. + * @member {string} [updateDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {boolean} [updateDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). * @member {number} [updateDescription.replicaSetCheckTimeoutInMilliseconds] - * @member {string} [updateDescription.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {string} [updateDescription.failureAction] 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' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [updateDescription.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] 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. + * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -3562,9 +4680,34 @@ export interface RollingUpgradeUpdateDescription { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {boolean} [enableDeltaHealthEvaluation] - * @member {object} [clusterUpgradeHealthPolicy] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta + * health evaluation rather than absolute health evaluation after completion of + * each upgrade domain. + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] * The maximum allowed percentage of nodes health degradation allowed during * cluster upgrades. The delta is measured between the state of the nodes at @@ -3581,8 +4724,12 @@ export interface RollingUpgradeUpdateDescription { * 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%. - * @member {object} [applicationHealthPolicyMap] - * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] + * @member {object} [applicationHealthPolicyMap] Defines the application health + * policy map used to evaluate the health of an application or one of its + * children entities. + * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] The + * wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ export interface UpdateClusterUpgradeDescription { upgradeKind?: string; @@ -3600,7 +4747,8 @@ export interface UpdateClusterUpgradeDescription { * Represents a safety check for the service partition being performed by * service fabric before continuing with operations. * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition which is undergoing the + * safety check. */ export interface PartitionSafetyCheck extends SafetyCheck { partitionId?: string; @@ -3654,7 +4802,9 @@ export interface SeedNodeSafetyCheck extends SafetyCheck { * ServiceTypeHealthPolicy. * @member {number} [totalCount] Total number of partitions of the service from * the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * PartitionHealthEvaluation that impacted the aggregated health. */ export interface PartitionsHealthEvaluation extends HealthEvaluation { maxPercentUnhealthyPartitionsPerService?: number; @@ -3662,6 +4812,30 @@ export interface PartitionsHealthEvaluation extends HealthEvaluation { unhealthyEvaluations?: HealthEvaluationWrapper[]; } +/** + * @class + * Initializes a new instance of the ReplicaEvent class. + * @constructor + * Represents the base for all Replica Events. + * + * @member {uuid} partitionId An internal ID used by Service Fabric to uniquely + * identify a partition. This is a randomly generated GUID when the service was + * created. The partition ID is unique and does not change for the lifetime of + * the service. If the same service was deleted and recreated the IDs of its + * partitions would be different. + * @member {string} replicaId 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. + */ +export interface ReplicaEvent extends FabricEvent { + partitionId: string; + replicaId: string; +} + /** * @class * Initializes a new instance of the ReplicaHealth class. @@ -3672,7 +4846,8 @@ export interface PartitionsHealthEvaluation extends HealthEvaluation { * unhealthy evaluations. * * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition to which this replica + * belongs. * @member {string} serviceKind Polymorphic Discriminator */ export interface ReplicaHealth extends EntityHealth { @@ -3689,9 +4864,21 @@ export interface ReplicaHealth extends EntityHealth { * evaluation is returned only when the aggregated health state is either Error * or Warning. * - * @member {uuid} [partitionId] - * @member {string} [replicaOrInstanceId] - * @member {array} [unhealthyEvaluations] + * @member {uuid} [partitionId] Id of the partition to which the replica + * belongs. + * @member {string} [replicaOrInstanceId] 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. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state of the replica. The types of the + * unhealthy evaluations can be EventHealthEvaluation. */ export interface ReplicaHealthEvaluation extends HealthEvaluation { partitionId?: string; @@ -3713,7 +4900,9 @@ export interface ReplicaHealthEvaluation extends HealthEvaluation { * ApplicationHealthPolicy. * @member {number} [totalCount] Total number of replicas in the partition from * the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ReplicaHealthEvaluation that impacted the aggregated health. */ export interface ReplicasHealthEvaluation extends HealthEvaluation { maxPercentUnhealthyReplicasPerPartition?: number; @@ -3727,10 +4916,10 @@ export interface ReplicasHealthEvaluation extends HealthEvaluation { * @constructor * Describes the parameters to restart a Service Fabric node. * - * @member {string} nodeInstanceId The instance id of the target node. If - * instance id is specified the node is restarted only if it matches with the + * @member {string} nodeInstanceId 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 + * instance ID. The instance ID can be obtained using get node query. Default * value: '0' . * @member {string} [createFabricDump] Specify True to create a dump of the * fabric node process. This is case sensitive. Possible values include: @@ -3741,6 +4930,24 @@ export interface RestartNodeDescription { createFabricDump?: string; } +/** + * @class + * Initializes a new instance of the ServiceEvent class. + * @constructor + * Represents the base for all Service Events. + * + * @member {string} serviceId The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + */ +export interface ServiceEvent extends FabricEvent { + serviceId: string; +} + /** * @class * Initializes a new instance of the ServiceFromTemplateDescription class. @@ -3749,11 +4956,16 @@ export interface RestartNodeDescription { * defined in the application manifest. * * - * @member {string} applicationName - * @member {string} serviceName - * @member {string} serviceTypeName - * @member {array} [initializationData] - * @member {string} [servicePackageActivationMode] Possible values include: + * @member {string} applicationName The name of the application, including the + * 'fabric:' URI scheme. + * @member {string} serviceName The full name of the service with 'fabric:' URI + * scheme. + * @member {string} serviceTypeName Name of the service type as specified in + * the service manifest. + * @member {array} [initializationData] The initialization data for the newly + * created service instance. + * @member {string} [servicePackageActivationMode] The activation mode of + * service package to be used for a service. Possible values include: * 'SharedProcess', 'ExclusiveProcess' * @member {string} [serviceDnsName] The DNS name of the service. It requires * the DNS system service to be enabled in Service Fabric cluster. @@ -3776,8 +4988,12 @@ export interface ServiceFromTemplateDescription { * evaluation is returned only when the aggregated health state is either Error * or Warning. * - * @member {string} [serviceName] - * @member {array} [unhealthyEvaluations] + * @member {string} [serviceName] Name of the service whose health evaluation + * is described by this object. + * @member {array} [unhealthyEvaluations] 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. */ export interface ServiceHealthEvaluation extends HealthEvaluation { serviceName?: string; @@ -3790,7 +5006,8 @@ export interface ServiceHealthEvaluation extends HealthEvaluation { * @constructor * Information about the health of a Service Fabric service. * - * @member {string} [name] + * @member {string} [name] The name of the service whose health information is + * described by this object. * @member {array} [partitionHealthStates] The list of partition health states * associated with the service. */ @@ -3805,8 +5022,15 @@ export interface ServiceHealth extends EntityHealth { * @constructor * Information about the service name. * - * @member {string} [id] - * @member {string} [name] + * @member {string} [id] The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + * @member {string} [name] The full name of the service with 'fabric:' URI + * scheme. */ export interface ServiceNameInfo { id?: string; @@ -3932,7 +5156,9 @@ export interface ServicePlacementRequireDomainDistributionPolicyDescription exte * unhealthy services from the ServiceTypeHealthPolicy. * @member {number} [totalCount] Total number of services of the current * service type in the application from the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ServiceHealthEvaluation that impacted the aggregated health. */ export interface ServicesHealthEvaluation extends HealthEvaluation { serviceTypeName?: string; @@ -3960,17 +5186,18 @@ export interface ServiceTypeExtensionDescription { * Initializes a new instance of the ServiceTypeDescription class. * @constructor * Describes a service type defined in the service manifest of a provisioned - * application type. The properties the the ones defined in the service - * manifest. + * application type. The properties the ones defined in the service manifest. * * @member {boolean} [isStateful] 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. - * @member {string} [serviceTypeName] + * @member {string} [serviceTypeName] Name of the service type as specified in + * the service manifest. * @member {string} [placementConstraints] The placement constraint to be used * when instantiating this service in a Service Fabric cluster. - * @member {array} [servicePlacementPolicies] - * @member {array} [extensions] + * @member {array} [servicePlacementPolicies] List of service placement policy + * descriptions. + * @member {array} [extensions] List of service type extensions. * @member {string} kind Polymorphic Discriminator */ export interface ServiceTypeDescription { @@ -3989,19 +5216,25 @@ export interface ServiceTypeDescription { * Information about a service type that is defined in a service manifest of a * provisioned application type. * - * @member {object} [serviceTypeDescription] + * @member {object} [serviceTypeDescription] Describes a service type defined + * in the service manifest of a provisioned application type. The properties + * the ones defined in the service manifest. * @member {boolean} [serviceTypeDescription.isStateful] 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. - * @member {string} [serviceTypeDescription.serviceTypeName] + * @member {string} [serviceTypeDescription.serviceTypeName] Name of the + * service type as specified in the service manifest. * @member {string} [serviceTypeDescription.placementConstraints] The placement * constraint to be used when instantiating this service in a Service Fabric * cluster. - * @member {array} [serviceTypeDescription.servicePlacementPolicies] - * @member {array} [serviceTypeDescription.extensions] + * @member {array} [serviceTypeDescription.servicePlacementPolicies] List of + * service placement policy descriptions. + * @member {array} [serviceTypeDescription.extensions] List of service type + * extensions. * @member {string} [serviceTypeDescription.kind] Polymorphic Discriminator - * @member {string} [serviceManifestName] + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. * @member {string} [serviceManifestVersion] The version of the service * manifest in which this service type is defined. * @member {boolean} [isServiceGroup] Indicates whether the service is a @@ -4031,9 +5264,9 @@ export interface ServiceTypeManifest { * @class * Initializes a new instance of the SingletonPartitionInformation class. * @constructor - * Information about a partition that is singleton. The services with - * singletone partitioning scheme are effectively non-partitioned. They only - * have one partition. + * Information about a partition that is singleton. The services with singleton + * partitioning scheme are effectively non-partitioned. They only have one + * partition. * */ export interface SingletonPartitionInformation extends PartitionInformation { @@ -4066,7 +5299,11 @@ export interface StatefulServiceInfo extends ServiceInfo { * 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. - * @member {object} [currentConfigurationEpoch] + * @member {object} [currentConfigurationEpoch] 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. * @member {string} [currentConfigurationEpoch.configurationVersion] The * current configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this replica @@ -4093,7 +5330,13 @@ export interface StatefulServicePartitionInfo extends ServicePartitionInfo { * unhealthy evaluations. * * - * @member {string} [replicaId] + * @member {string} [replicaId] 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. */ export interface StatefulServiceReplicaHealth extends ReplicaHealth { replicaId?: string; @@ -4104,9 +5347,15 @@ export interface StatefulServiceReplicaHealth extends ReplicaHealth { * Initializes a new instance of the StatefulServiceReplicaHealthState class. * @constructor * Represents the health state of the stateful service replica, which contains - * the replica id and the aggregated health state. - * - * @member {string} [replicaId] + * the replica ID and the aggregated health state. + * + * @member {string} [replicaId] 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. */ export interface StatefulServiceReplicaHealthState extends ReplicaHealthState { replicaId?: string; @@ -4141,12 +5390,16 @@ export interface StatelessServiceInfo extends ServiceInfo { * @class * Initializes a new instance of the StatelessServiceInstanceHealth class. * @constructor - * Represents the health of the statelss service instance. + * Represents the health of the stateless service instance. * Contains the instance aggregated health state, the health events and the * unhealthy evaluations. * * - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ export interface StatelessServiceInstanceHealth extends ReplicaHealth { instanceId?: string; @@ -4157,9 +5410,10 @@ export interface StatelessServiceInstanceHealth extends ReplicaHealth { * Initializes a new instance of the StatelessServiceInstanceHealthState class. * @constructor * Represents the health state of the stateless service instance, which - * contains the instance id and the aggregated health state. + * contains the instance ID and the aggregated health state. * - * @member {string} [replicaId] + * @member {string} [replicaId] Id of the stateless service instance on the + * wire this field is called ReplicaId. */ export interface StatelessServiceInstanceHealthState extends ReplicaHealthState { replicaId?: string; @@ -4202,7 +5456,11 @@ export interface StatelessServiceTypeDescription extends ServiceTypeDescription * evaluate health. The evaluation is returned only when the aggregated health * state of the cluster is either Error or Warning. * - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] 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. */ export interface SystemApplicationHealthEvaluation extends HealthEvaluation { unhealthyEvaluations?: HealthEvaluationWrapper[]; @@ -4230,7 +5488,9 @@ export interface SystemApplicationHealthEvaluation extends HealthEvaluation { * of upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. * @member {number} [totalCount] Total number of upgrade domain nodes in the * health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ export interface UpgradeDomainDeltaNodesCheckHealthEvaluation extends HealthEvaluation { upgradeDomainName?: string; @@ -4257,7 +5517,9 @@ export interface UpgradeDomainDeltaNodesCheckHealthEvaluation extends HealthEval * unhealthy nodes from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of nodes in the current upgrade * domain. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ export interface UpgradeDomainNodesHealthEvaluation extends HealthEvaluation { upgradeDomainName?: string; @@ -4271,9 +5533,9 @@ export interface UpgradeDomainNodesHealthEvaluation extends HealthEvaluation { * Initializes a new instance of the WaitForInbuildReplicaSafetyCheck class. * @constructor * Safety check that waits for the replica build operation to finish. This - * indiciates that there is a replica that is going through the copy or is + * 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 typoically expensive involving data movements. + * this copy operation which are typically expensive involving data movements. * */ export interface WaitForInbuildReplicaSafetyCheck extends PartitionSafetyCheck { @@ -4342,7 +5604,7 @@ export interface LoadMetricReport { * For default loads, LoadMetricReport's LastReportedUtc is set to 0. * * - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition. * @member {array} [primaryLoadMetricReports] Array of load reports from the * primary replica for this partition. * @member {array} [secondaryLoadMetricReports] Array of aggregated load @@ -4363,9 +5625,16 @@ export interface PartitionLoadInformation { * identity, role, status, health, node name, uptime, and other details about * the replica. * - * @member {string} [replicaRole] Possible values include: 'Unknown', 'None', - * 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {string} [replicaId] + * @member {string} [replicaRole] The role of a replica of a stateful service. + * Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', + * 'ActiveSecondary' + * @member {string} [replicaId] 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. */ export interface StatefulServiceReplicaInfo extends ReplicaInfo { replicaRole?: string; @@ -4380,7 +5649,11 @@ export interface StatefulServiceReplicaInfo extends ReplicaInfo { * identity, status, health, node name, uptime, and other details about the * instance. * - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ export interface StatelessServiceInstanceInfo extends ReplicaInfo { instanceId?: string; @@ -4392,25 +5665,68 @@ export interface StatelessServiceInstanceInfo extends ReplicaInfo { * @constructor * Represents a ServiceFabric cluster upgrade * - * @member {string} [configVersion] - * @member {string} [codeVersion] - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {boolean} [enableDeltaHealthEvaluation] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {string} [configVersion] The cluster configuration version + * (specified in the cluster manifest). + * @member {string} [codeVersion] The ServiceFabric code version of the + * cluster. + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta + * health evaluation rather than absolute health evaluation after completion of + * each upgrade domain. + * @member {object} [monitoringPolicy] Describes the parameters for monitoring + * an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -4443,8 +5759,31 @@ export interface StatelessServiceInstanceInfo extends ReplicaInfo { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [clusterUpgradeHealthPolicy] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] * The maximum allowed percentage of nodes health degradation allowed during * cluster upgrades. The delta is measured between the state of the nodes at @@ -4461,7 +5800,15 @@ export interface StatelessServiceInstanceInfo extends ReplicaInfo { * 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%. - * @member {array} [applicationHealthPolicyMap] + * @member {array} [applicationHealthPolicyMap] 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. */ export interface ClusterUpgradeDescriptionObject { configVersion?: string; @@ -4484,8 +5831,9 @@ export interface ClusterUpgradeDescriptionObject { * The detailed upgrade progress for nodes in the current upgrade domain at the * point of failure. * - * @member {string} [domainName] - * @member {array} [nodeUpgradeProgressList] + * @member {string} [domainName] The name of the upgrade domain + * @member {array} [nodeUpgradeProgressList] List of upgrading nodes and their + * statuses */ export interface FailedUpgradeDomainProgressObject { domainName?: string; @@ -4498,40 +5846,90 @@ export interface FailedUpgradeDomainProgressObject { * @constructor * Information about a cluster upgrade. * - * @member {string} [codeVersion] - * @member {string} [configVersion] - * @member {array} [upgradeDomains] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'RollingBackInProgress', 'RollingBackCompleted', 'RollingForwardPending', - * 'RollingForwardInProgress', 'RollingForwardCompleted', 'Failed' - * @member {string} [nextUpgradeDomain] - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {object} [upgradeDescription] - * @member {string} [upgradeDescription.configVersion] - * @member {string} [upgradeDescription.codeVersion] - * @member {string} [upgradeDescription.upgradeKind] Possible values include: - * 'Invalid', 'Rolling' - * @member {string} [upgradeDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {string} [codeVersion] The ServiceFabric code version of the + * cluster. + * @member {string} [configVersion] The cluster configuration version + * (specified in the cluster manifest). + * @member {array} [upgradeDomains] List of upgrade domains and their statuses. + * @member {string} [upgradeState] The state of the upgrade domain. Possible + * values include: 'Invalid', 'RollingBackInProgress', 'RollingBackCompleted', + * 'RollingForwardPending', 'RollingForwardInProgress', + * 'RollingForwardCompleted', 'Failed' + * @member {string} [nextUpgradeDomain] The name of the next upgrade domain to + * be processed. + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {object} [upgradeDescription] Represents a ServiceFabric cluster + * upgrade + * @member {string} [upgradeDescription.configVersion] The cluster + * configuration version (specified in the cluster manifest). + * @member {string} [upgradeDescription.codeVersion] The ServiceFabric code + * version of the cluster. + * @member {string} [upgradeDescription.upgradeKind] The kind of upgrade out of + * the following possible values. Possible values include: 'Invalid', 'Rolling' + * @member {string} [upgradeDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * @member {number} [upgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [upgradeDescription.forceRestart] - * @member {boolean} [upgradeDescription.enableDeltaHealthEvaluation] - * @member {object} [upgradeDescription.monitoringPolicy] - * @member {string} [upgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {boolean} [upgradeDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). + * @member {boolean} [upgradeDescription.enableDeltaHealthEvaluation] When + * true, enables delta health evaluation rather than absolute health evaluation + * after completion of each upgrade domain. + * @member {object} [upgradeDescription.monitoringPolicy] Describes the + * parameters for monitoring an upgrade in Monitored mode. + * @member {string} [upgradeDescription.monitoringPolicy.failureAction] 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' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * [upgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] 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. * @member {string} - * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [upgradeDescription.clusterHealthPolicy] + * [upgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [upgradeDescription.clusterHealthPolicy] Defines a health + * policy used to evaluate the health of the cluster or of a cluster node. * @member {boolean} * [upgradeDescription.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -4569,7 +5967,31 @@ export interface FailedUpgradeDomainProgressObject { * applications. Default percentage is zero. * @member {array} * [upgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [upgradeDescription.clusterUpgradeHealthPolicy] + * 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. + * @member {object} [upgradeDescription.clusterUpgradeHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster during a cluster + * upgrade. * @member {number} * [upgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] * The maximum allowed percentage of nodes health degradation allowed during @@ -4587,20 +6009,41 @@ export interface FailedUpgradeDomainProgressObject { * 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%. - * @member {array} [upgradeDescription.applicationHealthPolicyMap] - * @member {string} [upgradeDurationInMilliseconds] - * @member {string} [upgradeDomainDurationInMilliseconds] - * @member {array} [unhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] - * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] - * @member {string} [startTimestampUtc] - * @member {string} [failureTimestampUtc] - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * @member {array} [upgradeDescription.applicationHealthPolicyMap] 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. + * @member {string} [upgradeDurationInMilliseconds] The estimated elapsed time + * spent processing the current overall upgrade. + * @member {string} [upgradeDomainDurationInMilliseconds] The estimated elapsed + * time spent processing the current upgrade domain. + * @member {array} [unhealthyEvaluations] List of health evaluations that + * resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain + * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] List + * of upgrading nodes and their statuses + * @member {string} [startTimestampUtc] The start time of the upgrade in UTC. + * @member {string} [failureTimestampUtc] The failure time of the upgrade in + * UTC. + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] The detailed upgrade + * progress for nodes in the current upgrade domain at the point of failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of the + * upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] + * List of upgrading nodes and their statuses */ export interface ClusterUpgradeProgressObject { codeVersion?: string; @@ -4667,6 +6110,44 @@ export interface ClusterConfigurationUpgradeDescription { maxPercentUpgradeDomainDeltaUnhealthyNodes?: number; } +/** + * @class + * Initializes a new instance of the UpgradeOrchestrationServiceState class. + * @constructor + * Service state of Service Fabric Upgrade Orchestration Service. + * + * @member {string} [serviceState] The state of Service Fabric Upgrade + * Orchestration Service. + */ +export interface UpgradeOrchestrationServiceState { + serviceState?: string; +} + +/** + * @class + * Initializes a new instance of the UpgradeOrchestrationServiceStateSummary class. + * @constructor + * Service state summary of Service Fabric Upgrade Orchestration Service. + * + * @member {string} [currentCodeVersion] The current code version of the + * cluster. + * @member {string} [currentManifestVersion] The current manifest version of + * the cluster. + * @member {string} [targetCodeVersion] The target code version of the + * cluster. + * @member {string} [targetManifestVersion] The target manifest version of the + * cluster. + * @member {string} [pendingUpgradeType] The type of the pending upgrade of the + * cluster. + */ +export interface UpgradeOrchestrationServiceStateSummary { + currentCodeVersion?: string; + currentManifestVersion?: string; + targetCodeVersion?: string; + targetManifestVersion?: string; + pendingUpgradeType?: string; +} + /** * @class * Initializes a new instance of the ApplicationTypeImageStorePath class. @@ -4683,14 +6164,23 @@ export interface ApplicationTypeImageStorePath { /** * @class - * Initializes a new instance of the ApplicationTypeImageStoreVersion class. + * Initializes a new instance of the UnprovisionApplicationTypeDescriptionInfo class. * @constructor - * A version description for the application type + * Describes the operation to unregister or unprovision an application type and + * its version that was registered with the Service Fabric. * - * @member {string} applicationTypeVersion + * @member {string} applicationTypeVersion The version of the application type + * as defined in the application manifest. + * @member {boolean} [async] 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 to set it to true for large application packages that + * were provisioned. */ -export interface ApplicationTypeImageStoreVersion { +export interface UnprovisionApplicationTypeDescriptionInfo { applicationTypeVersion: string; + async?: boolean; } /** @@ -4744,10 +6234,11 @@ export interface CodePackageEntryPointStatistics { * * @member {string} [entryPointLocation] The location of entry point executable * on the node. - * @member {string} [processId] The process id of the entry point. + * @member {string} [processId] The process ID of the entry point. * @member {string} [runAsUserName] The user name under which entry point * executable is run on the node. - * @member {object} [codePackageEntryPointStatistics] + * @member {object} [codePackageEntryPointStatistics] Statistics about setup or + * main entry point of a code package deployed on a Service Fabric node. * @member {string} [codePackageEntryPointStatistics.lastExitCode] The last * exit code of the entry point. * @member {date} [codePackageEntryPointStatistics.lastActivationTime] The last @@ -4773,11 +6264,15 @@ export interface CodePackageEntryPointStatistics { * @member {string} * [codePackageEntryPointStatistics.continuousExitFailureCount] Number of times * the entry point continuously failed to exit gracefully. - * @member {string} [status] Possible values include: 'Invalid', 'Pending', - * 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [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' * @member {date} [nextActivationTime] The time (in UTC) when the entry point * executable will be run next. - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ export interface CodePackageEntryPoint { entryPointLocation?: string; @@ -4795,27 +6290,42 @@ export interface CodePackageEntryPoint { * @constructor * Information about code package deployed on a Service Fabric node. * - * @member {string} [name] + * @member {string} [name] The name of the code package. * @member {string} [version] The version of the code package specified in * service manifest. - * @member {string} [serviceManifestName] - * @member {string} [servicePackageActivationId] - * @member {string} [hostType] Possible values include: 'Invalid', 'ExeHost', - * 'ContainerHost' - * @member {string} [hostIsolationMode] Possible values include: 'None', - * 'Process', 'HyperV' - * @member {string} [status] Possible values include: 'Invalid', 'Downloading', - * 'Activating', 'Active', 'Upgrading', 'Deactivating' + * @member {string} [serviceManifestName] The name of service manifest that + * specified this code package. + * @member {string} [servicePackageActivationId] 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. + * @member {string} [hostType] Specifies the type of host for main entry point + * of a code package as specified in service manifest. Possible values include: + * 'Invalid', 'ExeHost', 'ContainerHost' + * @member {string} [hostIsolationMode] 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' + * @member {string} [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' * @member {string} [runFrequencyInterval] The interval at which code package * is run. This is used for periodic code package. - * @member {object} [setupEntryPoint] + * @member {object} [setupEntryPoint] Information about setup or main entry + * point of a code package deployed on a Service Fabric node. * @member {string} [setupEntryPoint.entryPointLocation] The location of entry * point executable on the node. - * @member {string} [setupEntryPoint.processId] The process id of the entry + * @member {string} [setupEntryPoint.processId] The process ID of the entry * point. * @member {string} [setupEntryPoint.runAsUserName] The user name under which * entry point executable is run on the node. * @member {object} [setupEntryPoint.codePackageEntryPointStatistics] + * Statistics about setup or main entry point of a code package deployed on a + * Service Fabric node. * @member {string} * [setupEntryPoint.codePackageEntryPointStatistics.lastExitCode] The last exit * code of the entry point. @@ -4848,19 +6358,26 @@ export interface CodePackageEntryPoint { * @member {string} * [setupEntryPoint.codePackageEntryPointStatistics.continuousExitFailureCount] * Number of times the entry point continuously failed to exit gracefully. - * @member {string} [setupEntryPoint.status] Possible values include: - * 'Invalid', 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [setupEntryPoint.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' * @member {date} [setupEntryPoint.nextActivationTime] The time (in UTC) when * the entry point executable will be run next. - * @member {string} [setupEntryPoint.instanceId] - * @member {object} [mainEntryPoint] + * @member {string} [setupEntryPoint.instanceId] 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. + * @member {object} [mainEntryPoint] Information about setup or main entry + * point of a code package deployed on a Service Fabric node. * @member {string} [mainEntryPoint.entryPointLocation] The location of entry * point executable on the node. - * @member {string} [mainEntryPoint.processId] The process id of the entry + * @member {string} [mainEntryPoint.processId] The process ID of the entry * point. * @member {string} [mainEntryPoint.runAsUserName] The user name under which * entry point executable is run on the node. - * @member {object} [mainEntryPoint.codePackageEntryPointStatistics] + * @member {object} [mainEntryPoint.codePackageEntryPointStatistics] Statistics + * about setup or main entry point of a code package deployed on a Service + * Fabric node. * @member {string} * [mainEntryPoint.codePackageEntryPointStatistics.lastExitCode] The last exit * code of the entry point. @@ -4892,11 +6409,15 @@ export interface CodePackageEntryPoint { * @member {string} * [mainEntryPoint.codePackageEntryPointStatistics.continuousExitFailureCount] * Number of times the entry point continuously failed to exit gracefully. - * @member {string} [mainEntryPoint.status] Possible values include: 'Invalid', - * 'Pending', 'Starting', 'Started', 'Stopping', 'Stopped' + * @member {string} [mainEntryPoint.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' * @member {date} [mainEntryPoint.nextActivationTime] The time (in UTC) when * the entry point executable will be run next. - * @member {string} [mainEntryPoint.instanceId] + * @member {string} [mainEntryPoint.instanceId] 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. */ export interface DeployedCodePackageInfo { name?: string; @@ -4911,21 +6432,6 @@ export interface DeployedCodePackageInfo { mainEntryPoint?: CodePackageEntryPoint; } -/** - * @class - * Initializes a new instance of the ChaosContextMapItem class. - * @constructor - * Describes an item in the ChaosContextMap in ChaosParameters. - * - * - * @member {string} key The key for a ChaosContextMapItem. - * @member {string} value The value for a ChaosContextMapItem. - */ -export interface ChaosContextMapItem { - key: string; - value: string; -} - /** * @class * Initializes a new instance of the ChaosContext class. @@ -4938,10 +6444,71 @@ export interface ChaosContextMapItem { * context about the specific run. * * - * @member {object} [map] + * @member {object} [map] Describes a map that contains a collection of + * ChaosContextMapItem's. */ export interface ChaosContext { - map?: any; + map?: { [propertyName: string]: string }; +} + +/** + * @class + * Initializes a new instance of the ChaosTargetFilter class. + * @constructor + * 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. + * + * + * @member {array} [nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [applicationInclusionList] A list of application URI's 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. + */ +export interface ChaosTargetFilter { + nodeTypeInclusionList?: string[]; + applicationInclusionList?: string[]; } /** @@ -4986,7 +6553,11 @@ export interface ChaosContext { * seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * . Default value: 30 . - * @member {object} [clusterHealthPolicy] + * @member {object} [clusterHealthPolicy] 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. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The maximum @@ -5019,9 +6590,75 @@ export interface ChaosContext { * ApplicationTypeHealthPolicyMap. * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. - * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [context] - * @member {object} [context.map] + * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {object} [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. + * @member {object} [context.map] Describes a map that contains a collection of + * ChaosContextMapItem's. + * @member {object} [chaosTargetFilter] 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. + * @member {array} [chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [chaosTargetFilter.applicationInclusionList] A list of + * application URI's 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. */ export interface ChaosParameters { timeToRunInSeconds?: string; @@ -5032,44 +6669,18 @@ export interface ChaosParameters { waitTimeBetweenIterationsInSeconds?: number; clusterHealthPolicy?: ClusterHealthPolicy; context?: ChaosContext; + chaosTargetFilter?: ChaosTargetFilter; } /** * @class - * Initializes a new instance of the ChaosEvent class. - * @constructor - * Represents an event generated during a Chaos run. - * - * @member {date} timeStampUtc - * @member {string} kind Polymorphic Discriminator - */ -export interface ChaosEvent { - timeStampUtc: Date; - kind: string; -} - -/** - * @class - * Initializes a new instance of the ChaosEventWrapper class. - * @constructor - * Wrapper object for Chaos event. - * - * @member {object} [chaosEvent] - * @member {date} [chaosEvent.timeStampUtc] - * @member {string} [chaosEvent.kind] Polymorphic Discriminator - */ -export interface ChaosEventWrapper { - chaosEvent?: ChaosEvent; -} - -/** - * @class - * Initializes a new instance of the ChaosReport class. + * Initializes a new instance of the Chaos class. * @constructor - * Contains detailed Chaos report. + * Contains a description of Chaos. * * - * @member {object} [chaosParameters] + * @member {object} [chaosParameters] If Chaos is running, these are the + * parameters Chaos is running with. * @member {string} [chaosParameters.timeToRunInSeconds] Total time (in * seconds) for which Chaos will run before automatically stopping. The maximum * allowed value is 4,294,967,295 (System.UInt32.MaxValue). @@ -5099,7 +6710,11 @@ export interface ChaosEventWrapper { * @member {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. - * @member {object} [chaosParameters.clusterHealthPolicy] + * @member {object} [chaosParameters.clusterHealthPolicy] 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. * @member {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -5136,48 +6751,466 @@ export interface ChaosEventWrapper { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [chaosParameters.context] - * @member {object} [chaosParameters.context.map] + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {object} [chaosParameters.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. + * @member {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * @member {object} [chaosParameters.chaosTargetFilter] 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. + * @member {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. * @member {string} [status] Current status of the Chaos run. - * - * - Invalid - Indicates an invalid Chaos status. All Service Fabric - * enumerations have the invalid type. - * The valus is zero. - * - Running - Indicates that Chaos is not stopped. - * - Stopped - Indicates that Chaos is not scheduling futher faults. Possible - * values include: 'Invalid', 'Running', 'Stopped' - * @member {string} [continuationToken] - * @member {array} [history] + * . Possible values include: 'Invalid', 'Running', 'Stopped' + * @member {string} [scheduleStatus] Current status of the schedule. + * . Possible values include: 'Invalid', 'Stopped', 'Active', 'Expired', + * 'Pending' */ -export interface ChaosReport { +export interface Chaos { chaosParameters?: ChaosParameters; status?: string; - continuationToken?: string; - history?: ChaosEventWrapper[]; + scheduleStatus?: string; } /** * @class - * Initializes a new instance of the ExecutingFaultsChaosEvent class. + * Initializes a new instance of the ChaosParametersDictionaryItem class. * @constructor - * 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. + * Defines an item in ChaosParametersDictionary of the Chaos Schedule. * - * @member {array} [faults] - */ -export interface ExecutingFaultsChaosEvent extends ChaosEvent { - faults?: string[]; -} - + * + * @member {string} key The key identifying the Chaos Parameter in the + * dictionary. This key is referenced by Chaos Schedule Jobs. + * @member {object} value Defines all the parameters to configure a Chaos run. + * @member {string} [value.timeToRunInSeconds] Total time (in seconds) for + * which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). + * @member {number} [value.maxClusterStabilizationTimeoutInSeconds] 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. + * @member {number} [value.maxConcurrentFaults] 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 -- + * 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. + * @member {boolean} [value.enableMoveReplicaFaults] Enables or disables the + * move primary and move secondary faults. + * @member {number} [value.waitTimeBetweenFaultsInSeconds] 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. + * @member {number} [value.waitTimeBetweenIterationsInSeconds] Time-separation + * (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * @member {object} [value.clusterHealthPolicy] 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. + * @member {boolean} [value.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * @member {number} [value.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * @member {number} [value.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * @member {array} [value.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * @member {object} [value.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. + * @member {object} [value.context.map] Describes a map that contains a + * collection of ChaosContextMapItem's. + * @member {object} [value.chaosTargetFilter] 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. + * @member {array} [value.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [value.chaosTargetFilter.applicationInclusionList] A list of + * application URI's 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. + */ +export interface ChaosParametersDictionaryItem { + key: string; + value: ChaosParameters; +} + +/** + * @class + * Initializes a new instance of the ChaosEvent class. + * @constructor + * Represents an event generated during a Chaos run. + * + * @member {date} timeStampUtc The UTC timestamp when this Chaos event was + * generated. + * @member {string} kind Polymorphic Discriminator + */ +export interface ChaosEvent { + timeStampUtc: Date; + kind: string; +} + +/** + * @class + * Initializes a new instance of the ChaosEventWrapper class. + * @constructor + * Wrapper object for Chaos event. + * + * @member {object} [chaosEvent] Represents an event generated during a Chaos + * run. + * @member {date} [chaosEvent.timeStampUtc] The UTC timestamp when this Chaos + * event was generated. + * @member {string} [chaosEvent.kind] Polymorphic Discriminator + */ +export interface ChaosEventWrapper { + chaosEvent?: ChaosEvent; +} + +/** + * @class + * Initializes a new instance of the ChaosEventsSegment class. + * @constructor + * Contains the list of Chaos events and the continuation token to get the next + * segment. + * + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [history] List of Chaos events that meet the user-supplied + * criteria. + */ +export interface ChaosEventsSegment { + continuationToken?: string; + history?: ChaosEventWrapper[]; +} + +/** + * @class + * Initializes a new instance of the ChaosScheduleJobActiveDaysOfWeek class. + * @constructor + * Defines the days of the week that a Chaos Schedule Job will run for. + * + * @member {boolean} [sunday] Indicates if the Chaos Schedule Job will run on + * Sunday. Default value: false . + * @member {boolean} [monday] Indicates if the Chaos Schedule Job will run on + * Monday. Default value: false . + * @member {boolean} [tuesday] Indicates if the Chaos Schedule Job will run on + * Tuesday. Default value: false . + * @member {boolean} [wednesday] Indicates if the Chaos Schedule Job will run + * on Wednesday. Default value: false . + * @member {boolean} [thursday] Indicates if the Chaos Schedule Job will run on + * Thursday. Default value: false . + * @member {boolean} [friday] Indicates if the Chaos Schedule Job will run on + * Friday. Default value: false . + * @member {boolean} [saturday] Indicates if the Chaos Schedule Job will run on + * Saturday. Default value: false . + */ +export interface ChaosScheduleJobActiveDaysOfWeek { + sunday?: boolean; + monday?: boolean; + tuesday?: boolean; + wednesday?: boolean; + thursday?: boolean; + friday?: boolean; + saturday?: boolean; +} + +/** + * @class + * Initializes a new instance of the TimeOfDay class. + * @constructor + * Defines an hour and minute of the day specified in 24 hour time. + * + * @member {number} [hour] Represents the hour of the day. Value must be + * between 0 and 23 inclusive. + * @member {number} [minute] Represents the minute of the hour. Value must be + * between 0 to 59 inclusive. + */ +export interface TimeOfDay { + hour?: number; + minute?: number; +} + +/** + * @class + * Initializes a new instance of the TimeRange class. + * @constructor + * Defines a time range in a 24 hour day specified by a start and end time. + * + * @member {object} [startTime] Defines an hour and minute of the day specified + * in 24 hour time. + * @member {number} [startTime.hour] Represents the hour of the day. Value must + * be between 0 and 23 inclusive. + * @member {number} [startTime.minute] Represents the minute of the hour. Value + * must be between 0 to 59 inclusive. + * @member {object} [endTime] Defines an hour and minute of the day specified + * in 24 hour time. + * @member {number} [endTime.hour] Represents the hour of the day. Value must + * be between 0 and 23 inclusive. + * @member {number} [endTime.minute] Represents the minute of the hour. Value + * must be between 0 to 59 inclusive. + */ +export interface TimeRange { + startTime?: TimeOfDay; + endTime?: TimeOfDay; +} + +/** + * @class + * Initializes a new instance of the ChaosScheduleJob class. + * @constructor + * Defines a repetition rule and parameters of Chaos to be used with the Chaos + * Schedule. + * + * @member {string} [chaosParameters] A reference to which Chaos Parameters of + * the Chaos Schedule to use. + * @member {object} [days] Defines the days of the week that a Chaos Schedule + * Job will run for. + * @member {boolean} [days.sunday] Indicates if the Chaos Schedule Job will run + * on Sunday + * @member {boolean} [days.monday] Indicates if the Chaos Schedule Job will run + * on Monday + * @member {boolean} [days.tuesday] Indicates if the Chaos Schedule Job will + * run on Tuesday + * @member {boolean} [days.wednesday] Indicates if the Chaos Schedule Job will + * run on Wednesday + * @member {boolean} [days.thursday] Indicates if the Chaos Schedule Job will + * run on Thursday + * @member {boolean} [days.friday] Indicates if the Chaos Schedule Job will run + * on Friday + * @member {boolean} [days.saturday] Indicates if the Chaos Schedule Job will + * run on Saturday + * @member {array} [times] A list of Time Ranges that specify when during + * active days that this job will run. The times are interpreted as UTC. + */ +export interface ChaosScheduleJob { + chaosParameters?: string; + days?: ChaosScheduleJobActiveDaysOfWeek; + times?: TimeRange[]; +} + +/** + * @class + * Initializes a new instance of the ChaosSchedule class. + * @constructor + * Defines the schedule used by Chaos. + * + * @member {date} [startDate] The date and time Chaos will start using this + * schedule. + * . Default value: new Date('1601-01-01T00:00:00Z') . + * @member {date} [expiryDate] The date and time Chaos will continue to use + * this schedule until. + * . Default value: new Date('9999-12-31T23:59:59.999Z') . + * @member {array} [chaosParametersDictionary] A mapping of string names to + * Chaos Parameters to be referenced by Chaos Schedule Jobs. + * @member {array} [jobs] A list of all Chaos Schedule Jobs that will be + * automated by the schedule. + */ +export interface ChaosSchedule { + startDate?: Date; + expiryDate?: Date; + chaosParametersDictionary?: ChaosParametersDictionaryItem[]; + jobs?: ChaosScheduleJob[]; +} + +/** + * @class + * Initializes a new instance of the ChaosScheduleDescription class. + * @constructor + * 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. + * + * @member {number} [version] The version number of the Schedule. + * @member {object} [schedule] Defines the schedule used by Chaos. + * @member {date} [schedule.startDate] The date and time Chaos will start using + * this schedule. + * @member {date} [schedule.expiryDate] The date and time Chaos will continue + * to use this schedule until. + * @member {array} [schedule.chaosParametersDictionary] A mapping of string + * names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * @member {array} [schedule.jobs] A list of all Chaos Schedule Jobs that will + * be automated by the schedule. + */ +export interface ChaosScheduleDescription { + version?: number; + schedule?: ChaosSchedule; +} + +/** + * @class + * Initializes a new instance of the ExecutingFaultsChaosEvent class. + * @constructor + * 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. + * + * @member {array} [faults] List of string description of the faults that Chaos + * decided to execute in an iteration. + */ +export interface ExecutingFaultsChaosEvent extends ChaosEvent { + faults?: string[]; +} + /** * @class * Initializes a new instance of the StartedChaosEvent class. * @constructor * Describes a Chaos event that gets generated when Chaos is started. * - * @member {object} [chaosParameters] + * @member {object} [chaosParameters] Defines all the parameters to configure a + * Chaos run. * @member {string} [chaosParameters.timeToRunInSeconds] Total time (in * seconds) for which Chaos will run before automatically stopping. The maximum * allowed value is 4,294,967,295 (System.UInt32.MaxValue). @@ -5207,7 +7240,11 @@ export interface ExecutingFaultsChaosEvent extends ChaosEvent { * @member {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. - * @member {object} [chaosParameters.clusterHealthPolicy] + * @member {object} [chaosParameters.clusterHealthPolicy] 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. * @member {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -5244,9 +7281,75 @@ export interface ExecutingFaultsChaosEvent extends ChaosEvent { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [chaosParameters.context] - * @member {object} [chaosParameters.context.map] + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * @member {object} [chaosParameters.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. + * @member {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * @member {object} [chaosParameters.chaosTargetFilter] 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. + * @member {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * @member {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. */ export interface StartedChaosEvent extends ChaosEvent { chaosParameters?: ChaosParameters; @@ -5259,7 +7362,9 @@ export interface StartedChaosEvent extends 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. * - * @member {string} [reason] + * @member {string} [reason] Describes why Chaos stopped. Chaos can stop + * because of StopChaos API call or the timeToRun provided in ChaosParameters + * is over. */ export interface StoppedChaosEvent extends ChaosEvent { reason?: string; @@ -5272,11 +7377,14 @@ export interface StoppedChaosEvent extends 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 - * a faultable entity, Chaos found that the entity was alreay faulted -- which - * would be an unexpected event. + * an entity, Chaos found that the entity was already faulted -- which would be + * an unexpected event. * * - * @member {string} [reason] + * @member {string} [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. */ export interface TestErrorChaosEvent extends ChaosEvent { reason?: string; @@ -5288,7 +7396,10 @@ export interface TestErrorChaosEvent extends ChaosEvent { * @constructor * Chaos event corresponding to a failure during validation. * - * @member {string} [reason] + * @member {string} [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. */ export interface ValidationFailedChaosEvent extends ChaosEvent { reason?: string; @@ -5302,7 +7413,8 @@ export interface ValidationFailedChaosEvent extends ChaosEvent { * cluster to become ready for faulting, for example, Chaos may be waiting for * the on-going upgrade to finish. * - * @member {string} [reason] + * @member {string} [reason] Describes why the WaitingChaosEvent was generated, + * for example, due to a cluster upgrade. */ export interface WaitingChaosEvent extends ChaosEvent { reason?: string; @@ -5332,7 +7444,8 @@ export interface WaitingChaosEvent extends ChaosEvent { * 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 . - * @member {array} [applicationMetrics] + * @member {array} [applicationMetrics] List of application capacity metric + * description. */ export interface ApplicationCapacityDescription { minimumNodes?: number; @@ -5346,11 +7459,23 @@ export interface ApplicationCapacityDescription { * @constructor * Describes a Service Fabric application. * - * @member {string} name - * @member {string} typeName - * @member {string} typeVersion - * @member {array} [parameterList] - * @member {object} [applicationCapacity] + * @member {string} name The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} typeName The application type name as defined in the + * application manifest. + * @member {string} typeVersion The version of the application type as defined + * in the application manifest. + * @member {array} [parameterList] List of application parameters with + * overridden values from their default values specified in the application + * manifest. + * @member {object} [applicationCapacity] 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 * @member {number} [applicationCapacity.minimumNodes] 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 @@ -5362,7 +7487,8 @@ export interface ApplicationCapacityDescription { * 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. - * @member {array} [applicationCapacity.applicationMetrics] + * @member {array} [applicationCapacity.applicationMetrics] List of application + * capacity metric description. */ export interface ApplicationDescription { name: string; @@ -5378,11 +7504,12 @@ export interface ApplicationDescription { * @constructor * Information about a Service Fabric compose deployment. * - * @member {string} [name] - * @member {string} [applicationName] - * @member {string} [status] Possible values include: 'Invalid', - * 'Provisioning', 'Creating', 'Ready', 'Unprovisioning', 'Deleting', 'Failed', - * 'Upgrading' + * @member {string} [name] The name of the deployment. + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} [status] The status of the compose deployment. Possible + * values include: 'Invalid', 'Provisioning', 'Creating', 'Ready', + * 'Unprovisioning', 'Deleting', 'Failed', 'Upgrading' * @member {string} [statusDetails] The status details of compose deployment * including failure message. */ @@ -5418,32 +7545,72 @@ export interface RegistryCredential { * @constructor * Describes the parameters for a compose deployment upgrade. * - * @member {string} deploymentName + * @member {string} deploymentName The name of the deployment. * @member {string} composeFileContent The content of the compose file that * describes the deployment to create. - * @member {object} [registryCredential] + * @member {object} [registryCredential] Credential information to connect to + * container registry. * @member {string} [registryCredential.registryUserName] The user name to * connect to container registry. * @member {string} [registryCredential.registryPassword] The password for * supplied username to connect to container registry. * @member {boolean} [registryCredential.passwordEncrypted] Indicates that * supplied container registry password is encrypted. - * @member {string} upgradeKind Possible values include: 'Invalid', 'Rolling'. - * Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for monitoring + * an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} @@ -5459,6 +7626,7 @@ export interface RegistryCredential { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -5499,7 +7667,9 @@ export interface RegistryCredential { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The map + * with service type health policy per service type name. The map is empty by + * default. */ export interface ComposeDeploymentUpgradeDescription { deploymentName: string; @@ -5519,29 +7689,71 @@ export interface ComposeDeploymentUpgradeDescription { * @constructor * Describes the parameters for a compose deployment upgrade. * - * @member {string} [deploymentName] - * @member {string} [applicationName] - * @member {string} [upgradeState] Possible values include: 'Invalid', - * 'ProvisioningTarget', 'RollingForwardInProgress', 'RollingForwardPending', + * @member {string} [deploymentName] The name of the target deployment. + * @member {string} [applicationName] The name of the target application, + * including the 'fabric:' URI scheme. + * @member {string} [upgradeState] The state of the compose deployment upgrade. + * . Possible values include: 'Invalid', 'ProvisioningTarget', + * 'RollingForwardInProgress', 'RollingForwardPending', * 'UnprovisioningCurrent', 'RollingForwardCompleted', 'RollingBackInProgress', * 'UnprovisioningTarget', 'RollingBackCompleted', 'Failed' - * @member {string} [upgradeStatusDetails] - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {boolean} [forceRestart] - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {string} [upgradeStatusDetails] Additional detailed information + * about the status of the pending upgrade. + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {object} [monitoringPolicy] Describes the parameters for monitoring + * an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [applicationHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} @@ -5557,6 +7769,7 @@ export interface ComposeDeploymentUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -5597,22 +7810,43 @@ export interface ComposeDeploymentUpgradeDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] - * @member {string} [targetApplicationTypeVersion] - * @member {string} [upgradeDuration] - * @member {string} [currentUpgradeDomainDuration] - * @member {array} [applicationUnhealthyEvaluations] - * @member {object} [currentUpgradeDomainProgress] - * @member {string} [currentUpgradeDomainProgress.domainName] - * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] - * @member {string} [startTimestampUtc] - * @member {string} [failureTimestampUtc] - * @member {string} [failureReason] Possible values include: 'None', - * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'UpgradeTimeout' - * @member {object} [upgradeDomainProgressAtFailure] - * @member {string} [upgradeDomainProgressAtFailure.domainName] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The map + * with service type health policy per service type name. The map is empty by + * default. + * @member {string} [targetApplicationTypeVersion] The target application type + * version (found in the application manifest) for the application upgrade. + * @member {string} [upgradeDuration] 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. + * @member {string} [currentUpgradeDomainDuration] 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. + * @member {array} [applicationUnhealthyEvaluations] List of health evaluations + * that resulted in the current aggregated health state. + * @member {object} [currentUpgradeDomainProgress] Information about the + * current in-progress upgrade domain. + * @member {string} [currentUpgradeDomainProgress.domainName] The name of the + * upgrade domain + * @member {array} [currentUpgradeDomainProgress.nodeUpgradeProgressList] List + * of upgrading nodes and their statuses + * @member {string} [startTimestampUtc] The estimated UTC datetime when the + * upgrade started. + * @member {string} [failureTimestampUtc] The estimated UTC datetime when the + * upgrade failed and FailureAction was executed. + * @member {string} [failureReason] The cause of an upgrade failure that + * resulted in FailureAction being executed. Possible values include: 'None', + * 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', + * 'OverallUpgradeTimeout' + * @member {object} [upgradeDomainProgressAtFailure] Information about the + * upgrade domain progress at the time of upgrade failure. + * @member {string} [upgradeDomainProgressAtFailure.domainName] The name of the + * upgrade domain * @member {array} [upgradeDomainProgressAtFailure.nodeUpgradeProgressList] - * @member {string} [applicationUpgradeStatusDetails] + * List of upgrading nodes and their statuses + * @member {string} [applicationUpgradeStatusDetails] Additional details of + * application upgrade including failure message. */ export interface ComposeDeploymentUpgradeProgressInfo { deploymentName?: string; @@ -5646,8 +7880,13 @@ export interface ComposeDeploymentUpgradeProgressInfo { * be obtained by executing the same query with the continuation token provided * in this list. * - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of compose deployment status information. */ export interface PagedComposeDeploymentStatusInfoList { continuationToken?: string; @@ -5661,10 +7900,11 @@ export interface PagedComposeDeploymentStatusInfoList { * Defines description for creating a Service Fabric compose deployment. * * - * @member {string} deploymentName + * @member {string} deploymentName The name of the deployment. * @member {string} composeFileContent The content of the compose file that * describes the deployment to create. - * @member {object} [registryCredential] + * @member {object} [registryCredential] Credential information to connect to + * container registry. * @member {string} [registryCredential.registryUserName] The user name to * connect to container registry. * @member {string} [registryCredential.registryPassword] The password for @@ -5684,12 +7924,20 @@ export interface CreateComposeDeploymentDescription { * @constructor * Information about service package deployed on a Service Fabric node. * - * @member {string} [name] + * @member {string} [name] The name of the service package as specified in the + * service manifest. * @member {string} [version] The version of the service package specified in * service manifest. - * @member {string} [status] Possible values include: 'Invalid', 'Downloading', - * 'Activating', 'Active', 'Upgrading', 'Deactivating' - * @member {string} [servicePackageActivationId] + * @member {string} [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' + * @member {string} [servicePackageActivationId] 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. */ export interface DeployedServicePackageInfo { name?: string; @@ -5704,9 +7952,12 @@ export interface DeployedServicePackageInfo { * @constructor * Creates a particular correlation between services. * - * @member {string} scheme Possible values include: 'Invalid', 'Affinity', - * 'AlignedAffinity', 'NonAlignedAffinity' - * @member {string} serviceName + * @member {string} scheme The ServiceCorrelationScheme which describes the + * relationship between this service and the service specified via ServiceName. + * Possible values include: 'Invalid', 'Affinity', 'AlignedAffinity', + * 'NonAlignedAffinity' + * @member {string} serviceName The name of the service that the correlation + * relationship is established with. */ export interface ServiceCorrelationDescription { scheme: string; @@ -5722,8 +7973,9 @@ export interface ServiceCorrelationDescription { * @member {string} name 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. - * @member {string} [weight] Possible values include: 'Zero', 'Low', 'Medium', - * 'High' + * @member {string} [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' * @member {number} [primaryDefaultLoad] 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. @@ -5800,6 +8052,48 @@ export interface UniformInt64RangePartitionSchemeDescription extends PartitionSc highKey: string; } +/** + * @class + * Initializes a new instance of the ScalingTriggerDescription class. + * @constructor + * Describes the trigger for performing a scaling operation. + * + * @member {string} kind Polymorphic Discriminator + */ +export interface ScalingTriggerDescription { + kind: string; +} + +/** + * @class + * Initializes a new instance of the ScalingMechanismDescription class. + * @constructor + * Describes the mechanism for performing a scaling operation. + * + * @member {string} kind Polymorphic Discriminator + */ +export interface ScalingMechanismDescription { + kind: string; +} + +/** + * @class + * Initializes a new instance of the ScalingPolicyDescription class. + * @constructor + * Describes how the scaling should be performed + * + * @member {object} scalingTrigger Specifies the trigger associated with this + * scaling policy + * @member {string} [scalingTrigger.kind] Polymorphic Discriminator + * @member {object} scalingMechanism Specifies the mechanism associated with + * this scaling policy + * @member {string} [scalingMechanism.kind] Polymorphic Discriminator + */ +export interface ScalingPolicyDescription { + scalingTrigger: ScalingTriggerDescription; + scalingMechanism: ScalingMechanismDescription; +} + /** * @class * Initializes a new instance of the ServiceDescription class. @@ -5807,11 +8101,17 @@ export interface UniformInt64RangePartitionSchemeDescription extends PartitionSc * A ServiceDescription contains all of the information necessary to create a * service. * - * @member {string} [applicationName] - * @member {string} serviceName - * @member {string} serviceTypeName - * @member {array} [initializationData] - * @member {object} partitionDescription + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} serviceName The full name of the service with 'fabric:' URI + * scheme. + * @member {string} serviceTypeName Name of the service type as specified in + * the service manifest. + * @member {array} [initializationData] The initialization data as an array of + * bytes. Initialization data is passed to service instances or replicas when + * they are created. + * @member {object} partitionDescription The partition description as an + * object. * @member {string} [partitionDescription.partitionScheme] Polymorphic * Discriminator * @member {string} [placementConstraints] The placement constraints as a @@ -5819,17 +8119,19 @@ export interface UniformInt64RangePartitionSchemeDescription extends PartitionSc * 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)". - * @member {array} [correlationScheme] - * @member {array} [serviceLoadMetrics] - * @member {array} [servicePlacementPolicies] - * @member {string} [defaultMoveCost] Possible values include: 'Zero', 'Low', - * 'Medium', 'High' + * @member {array} [correlationScheme] The correlation scheme. + * @member {array} [serviceLoadMetrics] The service load metrics. + * @member {array} [servicePlacementPolicies] The service placement policies. + * @member {string} [defaultMoveCost] The move cost for the service. Possible + * values include: 'Zero', 'Low', 'Medium', 'High' * @member {boolean} [isDefaultMoveCostSpecified] Indicates if the * DefaultMoveCost property is specified. - * @member {string} [servicePackageActivationMode] Possible values include: + * @member {string} [servicePackageActivationMode] The activation mode of + * service package to be used for a service. Possible values include: * 'SharedProcess', 'ExclusiveProcess' * @member {string} [serviceDnsName] The DNS name of the service. It requires * the DNS system service to be enabled in Service Fabric cluster. + * @member {array} [scalingPolicies] Scaling policies for this service. * @member {string} serviceKind Polymorphic Discriminator */ export interface ServiceDescription { @@ -5846,6 +8148,7 @@ export interface ServiceDescription { isDefaultMoveCostSpecified?: boolean; servicePackageActivationMode?: string; serviceDnsName?: string; + scalingPolicies?: ScalingPolicyDescription[]; serviceKind: string; } @@ -5997,7 +8300,9 @@ export interface RemoteReplicatorAcknowledgementDetail { * Provides details about the remote replicators from the primary replicator's * point of view. * - * @member {object} [replicationStreamAcknowledgementDetail] + * @member {object} [replicationStreamAcknowledgementDetail] Details about the + * acknowledgements for operations that are part of the replication stream + * data. * @member {string} * [replicationStreamAcknowledgementDetail.averageReceiveDuration] Represents * the average duration it takes for the remote replicator to receive an @@ -6012,7 +8317,8 @@ export interface RemoteReplicatorAcknowledgementDetail { * [replicationStreamAcknowledgementDetail.receivedAndNotAppliedCount] * Represents the number of operations received and not yet applied by a remote * replicator. - * @member {object} [copyStreamAcknowledgementDetail] + * @member {object} [copyStreamAcknowledgementDetail] Details about the + * acknowledgements for operations that are part of the copy stream data. * @member {string} [copyStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to * receive an operation. @@ -6038,7 +8344,8 @@ export interface RemoteReplicatorAcknowledgementStatus { * replicator’s point of view. * * - * @member {string} [replicaId] + * @member {string} [replicaId] Represents the replica ID of the remote + * secondary replicator. * @member {date} [lastAcknowledgementProcessedTimeUtc] The last timestamp (in * UTC) when an acknowledgement from the secondary replicator was processed on * the primary. @@ -6059,9 +8366,12 @@ export interface RemoteReplicatorAcknowledgementStatus { * 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. - * @member {object} [remoteReplicatorAcknowledgementStatus] + * @member {object} [remoteReplicatorAcknowledgementStatus] Represents the + * acknowledgment status for the remote secondary replicator. * @member {object} * [remoteReplicatorAcknowledgementStatus.replicationStreamAcknowledgementDetail] + * Details about the acknowledgements for operations that are part of the + * replication stream data. * @member {string} * [remoteReplicatorAcknowledgementStatus.replicationStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to @@ -6079,6 +8389,8 @@ export interface RemoteReplicatorAcknowledgementStatus { * replicator. * @member {object} * [remoteReplicatorAcknowledgementStatus.copyStreamAcknowledgementDetail] + * Details about the acknowledgements for operations that are part of the copy + * stream data. * @member {string} * [remoteReplicatorAcknowledgementStatus.copyStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to @@ -6110,7 +8422,11 @@ export interface RemoteReplicatorStatus { * @class * Initializes a new instance of the PrimaryReplicatorStatus class. * @constructor - * @member {object} [replicationQueueStatus] + * Provides statistics about the Service Fabric Replicator, when it is + * functioning in a Primary role. + * + * @member {object} [replicationQueueStatus] Details about the replication + * queue on the primary replicator. * @member {number} [replicationQueueStatus.queueUtilizationPercentage] * 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. @@ -6134,7 +8450,8 @@ export interface RemoteReplicatorStatus { * of the in-order operation received from the primary. * @member {string} [replicationQueueStatus.lastSequenceNumber] Represents the * latest sequence number of the operation that is available in the queue. - * @member {array} [remoteReplicators] + * @member {array} [remoteReplicators] The status of all the active and idle + * secondary replicators that the primary is aware of. */ export interface PrimaryReplicatorStatus extends ReplicatorStatus { replicationQueueStatus?: ReplicatorQueueStatus; @@ -6145,7 +8462,11 @@ export interface PrimaryReplicatorStatus extends ReplicatorStatus { * @class * Initializes a new instance of the SecondaryReplicatorStatus class. * @constructor - * @member {object} [replicationQueueStatus] + * Provides statistics about the Service Fabric Replicator, when it is + * functioning in a ActiveSecondary role. + * + * @member {object} [replicationQueueStatus] Details about the replication + * queue on the secondary replicator. * @member {number} [replicationQueueStatus.queueUtilizationPercentage] * 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. @@ -6175,7 +8496,8 @@ export interface PrimaryReplicatorStatus extends ReplicatorStatus { * message was never received. * @member {boolean} [isInBuild] Value that indicates whether the replica is * currently being built. - * @member {object} [copyQueueStatus] + * @member {object} [copyQueueStatus] Details about the copy queue on the + * secondary replicator. * @member {number} [copyQueueStatus.queueUtilizationPercentage] 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. @@ -6261,13 +8583,20 @@ export interface LoadMetricReportInfo { * @constructor * Information about a Service Fabric service replica deployed on a node. * - * @member {string} [serviceName] - * @member {uuid} [partitionId] - * @member {string} [currentServiceOperation] Possible values include: - * 'Unknown', 'None', 'Open', 'ChangeRole', 'Close', 'Abort' + * @member {string} [serviceName] Full hierarchical name of the service in URI + * format starting with `fabric:`. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for the + * lifetime of the service. If the same service was deleted and recreated the + * IDs of its partitions would be different. + * @member {string} [currentServiceOperation] 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' * @member {date} [currentServiceOperationStartTimeUtc] The start time of the * current service operation in UTC format. - * @member {array} [reportedLoad] + * @member {array} [reportedLoad] List of load reported by replica. * @member {string} serviceKind Polymorphic Discriminator */ export interface DeployedServiceReplicaDetailInfo { @@ -6326,17 +8655,31 @@ export interface KeyValueStoreReplicaStatus extends ReplicaStatusBase { * DeployedServiceReplicaQueryResult will contain duplicate data like * ServiceKind, ServiceName, PartitionId and replicaId. * - * @member {string} [replicaId] - * @member {string} [currentReplicatorOperation] Possible values include: + * @member {string} [replicaId] 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. + * @member {string} [currentReplicatorOperation] Specifies the operation + * currently being executed by the Replicator. Possible values include: * 'Invalid', 'None', 'Open', 'ChangeRole', 'UpdateEpoch', 'Close', 'Abort', * 'OnDataLoss', 'WaitForCatchup', 'Build' - * @member {string} [readStatus] Possible values include: 'Invalid', 'Granted', - * 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' - * @member {string} [writeStatus] Possible values include: 'Invalid', - * 'Granted', 'ReconfigurationPending', 'NotPrimary', 'NoWriteQuorum' - * @member {object} [replicatorStatus] + * @member {string} [readStatus] Specifies the access status of the partition. + * Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + * 'NotPrimary', 'NoWriteQuorum' + * @member {string} [writeStatus] Specifies the access status of the partition. + * Possible values include: 'Invalid', 'Granted', 'ReconfigurationPending', + * 'NotPrimary', 'NoWriteQuorum' + * @member {object} [replicatorStatus] 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. * @member {string} [replicatorStatus.kind] Polymorphic Discriminator - * @member {object} [replicaStatus] + * @member {object} [replicaStatus] Key value store related information for the + * replica. * @member {string} [replicaStatus.databaseRowCountEstimate] Value indicating * the estimated number of rows in the underlying database. * @member {string} [replicaStatus.databaseLogicalSizeEstimate] Value @@ -6349,24 +8692,36 @@ export interface KeyValueStoreReplicaStatus extends ReplicaStatusBase { * there is no pending callback. * @member {string} [replicaStatus.statusDetails] Value indicating the current * status details of the replica. - * @member {object} [deployedServiceReplicaQueryResult] - * @member {string} [deployedServiceReplicaQueryResult.replicaId] - * @member {string} [deployedServiceReplicaQueryResult.replicaRole] Possible - * values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - * 'ActiveSecondary' + * @member {object} [deployedServiceReplicaQueryResult] Information about a + * stateful service replica deployed on a node. + * @member {string} [deployedServiceReplicaQueryResult.replicaId] 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. + * @member {string} [deployedServiceReplicaQueryResult.replicaRole] The role of + * a replica of a stateful service. Possible values include: 'Unknown', 'None', + * 'Primary', 'IdleSecondary', 'ActiveSecondary' * @member {object} - * [deployedServiceReplicaQueryResult.reconfigurationInformation] + * [deployedServiceReplicaQueryResult.reconfigurationInformation] Information + * about current reconfiguration like phase, type, previous configuration role + * of replica and reconfiguration start date time. * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.previousConfigurationRole] - * Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - * 'ActiveSecondary' + * Replica role before reconfiguration started. Possible values include: + * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationPhase] - * Possible values include: 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', - * 'Phase3', 'Phase4', 'AbortPhaseZero' + * 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' * @member {string} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationType] - * Possible values include: 'Unknown', 'SwapPrimary', 'Failover', 'Other' + * Type of current ongoing reconfiguration. If no reconfiguration is taking + * place then this value will be "None". Possible values include: 'Unknown', + * 'SwapPrimary', 'Failover', 'Other' * @member {date} * [deployedServiceReplicaQueryResult.reconfigurationInformation.reconfigurationStartTimeUtc] * Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration is @@ -6390,9 +8745,19 @@ export interface DeployedStatefulServiceReplicaDetailInfo extends DeployedServic * note that DeployedServiceReplicaQueryResult will contain duplicate data like * ServiceKind, ServiceName, PartitionId and InstanceId. * - * @member {string} [instanceId] - * @member {object} [deployedServiceReplicaQueryResult] - * @member {string} [deployedServiceReplicaQueryResult.instanceId] + * @member {string} [instanceId] 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. + * @member {object} [deployedServiceReplicaQueryResult] Information about a + * stateless service instance deployed on a node. + * @member {string} [deployedServiceReplicaQueryResult.instanceId] 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. */ export interface DeployedStatelessServiceInstanceDetailInfo extends DeployedServiceReplicaDetailInfo { instanceId?: string; @@ -6436,16 +8801,19 @@ export interface DeployedStatelessServiceInstanceDetailInfo extends DeployedServ * 256. * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. * @member {string} [placementConstraints] 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)". - * @member {array} [correlationScheme] - * @member {array} [loadMetrics] - * @member {array} [servicePlacementPolicies] - * @member {string} [defaultMoveCost] Possible values include: 'Zero', 'Low', - * 'Medium', 'High' + * @member {array} [correlationScheme] The correlation scheme. + * @member {array} [loadMetrics] The service load metrics. + * @member {array} [servicePlacementPolicies] The service placement policies. + * @member {string} [defaultMoveCost] The move cost for the service. Possible + * values include: 'Zero', 'Low', 'Medium', 'High' + * @member {array} [scalingPolicies] Scaling policies for this service. * @member {string} serviceKind Polymorphic Discriminator */ export interface ServiceUpdateDescription { @@ -6455,6 +8823,7 @@ export interface ServiceUpdateDescription { loadMetrics?: ServiceLoadMetricDescription[]; servicePlacementPolicies?: ServicePlacementPolicyDescription[]; defaultMoveCost?: string; + scalingPolicies?: ScalingPolicyDescription[]; serviceKind: string; } @@ -6501,14 +8870,18 @@ export interface StatelessServiceUpdateDescription extends ServiceUpdateDescript * @constructor * Information about the version of image store file. * - * @member {string} [versionNumber] The current iamge store version number for + * @member {string} [versionNumber] The current image store version number for * the file is used in image store for checking whether it need to be updated. * @member {string} [epochDataLossNumber] The epoch data loss number of image - * store file is used to indicate the status of data loss. + * store replica when this file entry was updated or created. + * @member {string} [epochConfigurationNumber] The epoch configuration version + * number of the image store replica when this file entry was created or + * updated. */ export interface FileVersion { versionNumber?: string; epochDataLossNumber?: string; + epochConfigurationNumber?: string; } /** @@ -6518,12 +8891,16 @@ export interface FileVersion { * Information about a image store file. * * @member {string} [fileSize] The size of file in bytes. - * @member {object} [fileVersion] - * @member {string} [fileVersion.versionNumber] The current iamge store version + * @member {object} [fileVersion] Information about the version of image store + * file. + * @member {string} [fileVersion.versionNumber] The current image store version * number for the file is used in image store for checking whether it need to * be updated. * @member {string} [fileVersion.epochDataLossNumber] The epoch data loss - * number of image store file is used to indicate the status of data loss. + * number of image store replica when this file entry was updated or created. + * @member {string} [fileVersion.epochConfigurationNumber] The epoch + * configuration version number of the image store replica when this file entry + * was created or updated. * @member {date} [modifiedDate] The date and time when the image store file * was last modified. * @member {string} [storeRelativePath] The file path relative to the image @@ -6540,16 +8917,17 @@ export interface FileInfo { * @class * Initializes a new instance of the FolderInfo class. * @constructor - * Information about a image store folder. It inclues how many files this + * Information about a image store folder. It includes how many files this * folder contains and its image store relative path. * - * @member {string} [storeRelativePath] - * @member {uuid} [fileCount] The number of files from within the image store + * @member {string} [storeRelativePath] The remote location within image store. + * This path is relative to the image store root. + * @member {number} [fileCount] The number of files from within the image store * folder. */ export interface FolderInfo { storeRelativePath?: string; - fileCount?: string; + fileCount?: number; } /** @@ -6560,7 +8938,7 @@ export interface FolderInfo { * * @member {array} [storeFiles] The list of image store file info objects * represents files found under the given image store relative path. - * @member {array} [storeFolders] The list of image store folder info objectes + * @member {array} [storeFolders] The list of image store folder info objects * represents subfolders found under the given image store relative path. */ export interface ImageStoreContent { @@ -6598,14 +8976,30 @@ export interface ImageStoreCopyDescription { * @class * Initializes a new instance of the RestartDeployedCodePackageDescription class. * @constructor - * Defines description for restarting a deloyed code package on Service Fabric + * Defines description for restarting a deployed code package on Service Fabric * node. * * - * @member {string} serviceManifestName - * @member {string} [servicePackageActivationId] - * @member {string} codePackageName - * @member {string} codePackageInstanceId + * @member {string} serviceManifestName The name of service manifest that + * specified this code package. + * @member {string} [servicePackageActivationId] 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. + * @member {string} codePackageName The name of the code package defined in the + * service manifest. + * @member {string} codePackageInstanceId 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. */ export interface RestartDeployedCodePackageDescription { serviceManifestName: string; @@ -6621,12 +9015,21 @@ export interface RestartDeployedCodePackageDescription { * Information about service type deployed on a node, information such as the * status of the service type registration on a node. * - * @member {string} [serviceTypeName] - * @member {string} [serviceManifestName] - * @member {string} [codePackageName] - * @member {string} [status] Possible values include: 'Invalid', 'Disabled', - * 'Enabled', 'Registered' - * @member {string} [servicePackageActivationId] + * @member {string} [serviceTypeName] Name of the service type as specified in + * the service manifest. + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. + * @member {string} [codePackageName] The name of the code package that + * registered the service type. + * @member {string} [status] The status of the service type registration on the + * node. Possible values include: 'Invalid', 'Disabled', 'Enabled', + * 'Registered' + * @member {string} [servicePackageActivationId] 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. */ export interface DeployedServiceTypeInfo { serviceTypeName?: string; @@ -6642,7 +9045,8 @@ export interface DeployedServiceTypeInfo { * @constructor * Endpoint of a resolved service partition. * - * @member {string} [kind] Possible values include: 'Invalid', 'Stateless', + * @member {string} [kind] The role of the replica where the endpoint is + * reported. Possible values include: 'Invalid', 'Stateless', * 'StatefulPrimary', 'StatefulSecondary' * @member {string} [address] The address of the endpoint. If the endpoint has * multiple listeners the address is a JSON object with one property per @@ -6659,12 +9063,19 @@ export interface ResolvedServiceEndpoint { * @constructor * Information about a service partition and its associated endpoints. * - * @member {string} name - * @member {object} partitionInformation - * @member {uuid} [partitionInformation.id] + * @member {string} name The full name of the service with 'fabric:' URI + * scheme. + * @member {object} partitionInformation A representation of the resolved + * partition. + * @member {uuid} [partitionInformation.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. * @member {string} [partitionInformation.servicePartitionKind] Polymorphic * Discriminator - * @member {array} endpoints + * @member {array} endpoints List of resolved service endpoints of a service + * partition. * @member {string} version 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. @@ -6683,8 +9094,13 @@ export interface ResolvedServicePartition { * This class returns information about the partition that the user-induced * operation acted upon. * - * @member {string} [serviceName] - * @member {uuid} [partitionId] + * @member {string} [serviceName] The name of the service the partition belongs + * to. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for the + * lifetime of the service. If the same service was deleted and recreated the + * IDs of its partitions would be different. */ export interface SelectedPartition { serviceName?: string; @@ -6700,9 +9116,15 @@ export interface SelectedPartition { * * @member {number} [errorCode] If OperationState is Completed, this is 0. If * OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service the + * partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique and + * does not change for the lifetime of the service. If the same service was + * deleted and recreated the IDs of its partitions would be different. */ export interface InvokeDataLossResult { errorCode?: number; @@ -6718,9 +9140,15 @@ export interface InvokeDataLossResult { * * @member {number} [errorCode] If OperationState is Completed, this is 0. If * OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service the + * partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique and + * does not change for the lifetime of the service. If the same service was + * deleted and recreated the IDs of its partitions would be different. */ export interface InvokeQuorumLossResult { errorCode?: number; @@ -6734,7 +9162,7 @@ export interface InvokeQuorumLossResult { * Contains information about a node that was targeted by a user-induced * operation. * - * @member {string} [nodeName] + * @member {string} [nodeName] The name of a Service Fabric node. * @member {string} [nodeInstanceId] The node instance id. */ export interface NodeResult { @@ -6751,8 +9179,9 @@ export interface NodeResult { * * @member {number} [errorCode] If OperationState is Completed, this is 0. If * OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [nodeResult] - * @member {string} [nodeResult.nodeName] + * @member {object} [nodeResult] Contains information about a node that was + * targeted by a user-induced operation. + * @member {string} [nodeResult.nodeName] The name of a Service Fabric node. * @member {string} [nodeResult.nodeInstanceId] The node instance id. */ export interface NodeTransitionResult { @@ -6770,14 +9199,18 @@ export interface NodeTransitionResult { * is Completed or Faulted. * * - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [nodeTransitionResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [nodeTransitionResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [nodeTransitionResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [nodeTransitionResult.nodeResult] - * @member {string} [nodeTransitionResult.nodeResult.nodeName] + * @member {object} [nodeTransitionResult.nodeResult] Contains information + * about a node that was targeted by a user-induced operation. + * @member {string} [nodeTransitionResult.nodeResult.nodeName] The name of a + * Service Fabric node. * @member {string} [nodeTransitionResult.nodeResult.nodeInstanceId] The node * instance id. */ @@ -6793,11 +9226,13 @@ export interface NodeTransitionProgress { * Contains the OperationId, OperationState, and OperationType for user-induced * operations. * - * @member {uuid} [operationId] - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {string} [type] Possible values include: 'Invalid', - * 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', + * @member {uuid} [operationId] A GUID that identifies a call to this API. + * This is also passed into the corresponding GetProgress API. + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {string} [type] The type of the operation. Possible values include: + * 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', * 'NodeTransition' */ export interface OperationStatus { @@ -6812,15 +9247,24 @@ export interface OperationStatus { * @constructor * Information about a partition data loss user-induced operation. * - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [invokeDataLossResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [invokeDataLossResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [invokeDataLossResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [invokeDataLossResult.selectedPartition] - * @member {string} [invokeDataLossResult.selectedPartition.serviceName] - * @member {uuid} [invokeDataLossResult.selectedPartition.partitionId] + * @member {object} [invokeDataLossResult.selectedPartition] This class returns + * information about the partition that the user-induced operation acted upon. + * @member {string} [invokeDataLossResult.selectedPartition.serviceName] The + * name of the service the partition belongs to. + * @member {uuid} [invokeDataLossResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This is + * a randomly generated GUID when the service was created. The partition ID is + * unique and does not change for the lifetime of the service. If the same + * service was deleted and recreated the IDs of its partitions would be + * different. */ export interface PartitionDataLossProgress { state?: string; @@ -6833,15 +9277,25 @@ export interface PartitionDataLossProgress { * @constructor * Information about a partition quorum loss user-induced operation. * - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [invokeQuorumLossResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [invokeQuorumLossResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [invokeQuorumLossResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [invokeQuorumLossResult.selectedPartition] - * @member {string} [invokeQuorumLossResult.selectedPartition.serviceName] - * @member {uuid} [invokeQuorumLossResult.selectedPartition.partitionId] + * @member {object} [invokeQuorumLossResult.selectedPartition] This class + * returns information about the partition that the user-induced operation + * acted upon. + * @member {string} [invokeQuorumLossResult.selectedPartition.serviceName] The + * name of the service the partition belongs to. + * @member {uuid} [invokeQuorumLossResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This is + * a randomly generated GUID when the service was created. The partition ID is + * unique and does not change for the lifetime of the service. If the same + * service was deleted and recreated the IDs of its partitions would be + * different. */ export interface PartitionQuorumLossProgress { state?: string; @@ -6857,9 +9311,15 @@ export interface PartitionQuorumLossProgress { * * @member {number} [errorCode] If OperationState is Completed, this is 0. If * OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service the + * partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique and + * does not change for the lifetime of the service. If the same service was + * deleted and recreated the IDs of its partitions would be different. */ export interface RestartPartitionResult { errorCode?: number; @@ -6872,15 +9332,25 @@ export interface RestartPartitionResult { * @constructor * Information about a partition restart user-induced operation. * - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [restartPartitionResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [restartPartitionResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [restartPartitionResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [restartPartitionResult.selectedPartition] - * @member {string} [restartPartitionResult.selectedPartition.serviceName] - * @member {uuid} [restartPartitionResult.selectedPartition.partitionId] + * @member {object} [restartPartitionResult.selectedPartition] This class + * returns information about the partition that the user-induced operation + * acted upon. + * @member {string} [restartPartitionResult.selectedPartition.serviceName] The + * name of the service the partition belongs to. + * @member {uuid} [restartPartitionResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This is + * a randomly generated GUID when the service was created. The partition ID is + * unique and does not change for the lifetime of the service. If the same + * service was deleted and recreated the IDs of its partitions would be + * different. */ export interface PartitionRestartProgress { state?: string; @@ -6895,8 +9365,9 @@ export interface PartitionRestartProgress { * * @member {string} [sharedPackageName] The name of code, configuration or data * package that should be shared. - * @member {string} [packageSharingScope] Possible values include: 'None', - * 'All', 'Code', 'Config', 'Data' + * @member {string} [packageSharingScope] Represents the scope for + * PackageSharingPolicy. This is specified during DeployServicePackageToNode + * operation. Possible values include: 'None', 'All', 'Code', 'Config', 'Data' */ export interface PackageSharingPolicyInfo { sharedPackageName?: string; @@ -6911,11 +9382,15 @@ export interface PackageSharingPolicyInfo { * manifest to image cache on a Service Fabric node. * * - * @member {string} serviceManifestName - * @member {string} applicationTypeName - * @member {string} applicationTypeVersion - * @member {string} nodeName - * @member {array} [packageSharingPolicy] + * @member {string} serviceManifestName The name of service manifest whose + * packages need to be downloaded. + * @member {string} applicationTypeName The application type name as defined in + * the application manifest. + * @member {string} applicationTypeVersion The version of the application type + * as defined in the application manifest. + * @member {string} nodeName The name of a Service Fabric node. + * @member {array} [packageSharingPolicy] List of package sharing policy + * information. */ export interface DeployServicePackageToNodeDescription { serviceManifestName: string; @@ -6945,10 +9420,13 @@ export interface ResumeApplicationUpgradeDescription { * @constructor * Describes the parameters for updating an ongoing application upgrade. * - * @member {string} name - * @member {string} upgradeKind Possible values include: 'Invalid', 'Rolling'. - * Default value: 'Rolling' . - * @member {object} [applicationHealthPolicy] + * @member {string} name The name of the application, including the 'fabric:' + * URI scheme. + * @member {string} upgradeKind The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {object} [applicationHealthPolicy] Defines a health policy used to + * evaluate the health of an application or one of its children entities. * @member {boolean} [applicationHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} @@ -6964,6 +9442,7 @@ export interface ResumeApplicationUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * @member {object} [applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * @member {number} * [applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed @@ -7004,19 +9483,60 @@ export interface ResumeApplicationUpgradeDescription { * service type. * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. - * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] - * @member {object} [updateDescription] - * @member {string} [updateDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * @member {boolean} [updateDescription.forceRestart] + * @member {array} [applicationHealthPolicy.serviceTypeHealthPolicyMap] The map + * with service type health policy per service type name. The map is empty by + * default. + * @member {object} [updateDescription] Describes the parameters for updating a + * rolling upgrade of application or cluster. + * @member {string} [updateDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {boolean} [updateDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). * @member {number} [updateDescription.replicaSetCheckTimeoutInMilliseconds] - * @member {string} [updateDescription.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {string} [updateDescription.failureAction] 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' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} [updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * @member {string} [updateDescription.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. + * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] 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. + * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] 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. */ export interface ApplicationUpgradeUpdateDescription { name: string; @@ -7027,385 +9547,3389 @@ export interface ApplicationUpgradeUpdateDescription { /** * @class - * Initializes a new instance of the NodeImpact class. + * Initializes a new instance of the NameDescription class. * @constructor - * Describes the expected impact of a repair to a particular node. + * Describes a Service Fabric name. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * - * @member {string} nodeName The name of the impacted node. - * @member {string} [impactLevel] The level of impact expected. Possible values - * include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + * @member {string} name The Service Fabric name, including the 'fabric:' URI + * scheme. */ -export interface NodeImpact { - nodeName: string; - impactLevel?: string; +export interface NameDescription { + name: string; } /** * @class - * Initializes a new instance of the RepairImpactDescriptionBase class. + * Initializes a new instance of the PagedSubNameInfoList class. * @constructor - * 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. + * 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. * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {boolean} [isConsistent] Indicates whether any name under the given + * name has been modified during the enumeration. If there was a modification, + * this property value is false. + * @member {array} [subNames] List of the child names. + */ +export interface PagedSubNameInfoList { + continuationToken?: string; + isConsistent?: boolean; + subNames?: string[]; +} + +/** + * @class + * Initializes a new instance of the PropertyValue class. + * @constructor + * Describes a Service Fabric property value. * * @member {string} kind Polymorphic Discriminator */ -export interface RepairImpactDescriptionBase { +export interface PropertyValue { kind: string; } /** * @class - * Initializes a new instance of the NodeRepairImpactDescription class. + * Initializes a new instance of the BinaryPropertyValue class. * @constructor - * 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. - * + * Describes a Service Fabric property value of type Binary. * - * @member {array} [nodeImpactList] The list of nodes impacted by a repair - * action and their respective expected impact. + * @member {array} data Array of bytes to be sent as an integer array. Each + * element of array is a number between 0 and 255. */ -export interface NodeRepairImpactDescription extends RepairImpactDescriptionBase { - nodeImpactList?: NodeImpact[]; +export interface BinaryPropertyValue extends PropertyValue { + data: number[]; } /** * @class - * Initializes a new instance of the RepairTargetDescriptionBase class. + * Initializes a new instance of the Int64PropertyValue class. * @constructor - * 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. - * + * Describes a Service Fabric property value of type Int64. * - * @member {string} kind Polymorphic Discriminator + * @member {string} data The data of the property value. */ -export interface RepairTargetDescriptionBase { - kind: string; +export interface Int64PropertyValue extends PropertyValue { + data: string; } /** * @class - * Initializes a new instance of the NodeRepairTargetDescription class. + * Initializes a new instance of the DoublePropertyValue class. * @constructor - * Describes the list of nodes targeted by a repair action. + * Describes a Service Fabric property value of type Double. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. - * - * - * @member {array} [nodeNames] The list of nodes targeted by a repair action. + * @member {number} data The data of the property value. */ -export interface NodeRepairTargetDescription extends RepairTargetDescriptionBase { - nodeNames?: string[]; +export interface DoublePropertyValue extends PropertyValue { + data: number; } /** * @class - * Initializes a new instance of the RepairTaskHistory class. + * Initializes a new instance of the StringPropertyValue class. * @constructor - * A record of the times when the repair task entered each state. + * Describes a Service Fabric property value of type String. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @member {string} data The data of the property value. + */ +export interface StringPropertyValue extends PropertyValue { + data: string; +} + +/** + * @class + * Initializes a new instance of the GuidPropertyValue class. + * @constructor + * Describes a Service Fabric property value of type Guid. * + * @member {uuid} data The data of the property value. + */ +export interface GuidPropertyValue extends PropertyValue { + data: string; +} + +/** + * @class + * Initializes a new instance of the PropertyMetadata class. + * @constructor + * The metadata associated with a property, including the property's name. * - * @member {date} [createdUtcTimestamp] The time when the repair task entered - * the Created state. - * @member {date} [claimedUtcTimestamp] The time when the repair task entered - * the Claimed state. - * @member {date} [preparingUtcTimestamp] The time when the repair task entered - * the Preparing state. - * @member {date} [approvedUtcTimestamp] The time when the repair task entered - * the Approved state - * @member {date} [executingUtcTimestamp] The time when the repair task entered - * the Executing state - * @member {date} [restoringUtcTimestamp] The time when the repair task entered - * the Restoring state - * @member {date} [completedUtcTimestamp] The time when the repair task entered - * the Completed state - * @member {date} [preparingHealthCheckStartUtcTimestamp] The time when the - * repair task started the health check in the Preparing state. - * @member {date} [preparingHealthCheckEndUtcTimestamp] The time when the - * repair task completed the health check in the Preparing state. - * @member {date} [restoringHealthCheckStartUtcTimestamp] The time when the - * repair task started the health check in the Restoring state. - * @member {date} [restoringHealthCheckEndUtcTimestamp] The time when the - * repair task completed the health check in the Restoring state. + * @member {string} [typeId] The kind of property, determined by the type of + * data. Following are the possible values. Possible values include: 'Invalid', + * 'Binary', 'Int64', 'Double', 'String', 'Guid' + * @member {string} [customTypeId] The property's custom type id. + * @member {string} [parent] The name of the parent Service Fabric Name for the + * property. It could be thought of as the namespace/table under which the + * property exists. + * @member {number} [sizeInBytes] The length of the serialized property value. + * @member {date} [lastModifiedUtcTimestamp] Represents when the Property was + * last modified. Only write operations will cause this field to be updated. + * @member {string} [sequenceNumber] The version of the property. Every time a + * property is modified, its sequence number is increased. */ -export interface RepairTaskHistory { - createdUtcTimestamp?: Date; - claimedUtcTimestamp?: Date; - preparingUtcTimestamp?: Date; - approvedUtcTimestamp?: Date; - executingUtcTimestamp?: Date; - restoringUtcTimestamp?: Date; - completedUtcTimestamp?: Date; - preparingHealthCheckStartUtcTimestamp?: Date; - preparingHealthCheckEndUtcTimestamp?: Date; - restoringHealthCheckStartUtcTimestamp?: Date; - restoringHealthCheckEndUtcTimestamp?: Date; +export interface PropertyMetadata { + typeId?: string; + customTypeId?: string; + parent?: string; + sizeInBytes?: number; + lastModifiedUtcTimestamp?: Date; + sequenceNumber?: string; } /** * @class - * Initializes a new instance of the RepairTask class. + * Initializes a new instance of the PropertyInfo class. * @constructor - * Represents a repair task, which includes information about what kind of - * repair was requested, what its progress is, and what its final result was. + * Information about a Service Fabric property. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @member {string} name The name of the Service Fabric property. + * @member {object} [value] Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + * @member {object} metadata The metadata associated with a property, including + * the property's name. + * @member {string} [metadata.typeId] The kind of property, determined by the + * type of data. Following are the possible values. Possible values include: + * 'Invalid', 'Binary', 'Int64', 'Double', 'String', 'Guid' + * @member {string} [metadata.customTypeId] The property's custom type id. + * @member {string} [metadata.parent] The name of the parent Service Fabric + * Name for the property. It could be thought of as the namespace/table under + * which the property exists. + * @member {number} [metadata.sizeInBytes] The length of the serialized + * property value. + * @member {date} [metadata.lastModifiedUtcTimestamp] Represents when the + * Property was last modified. Only write operations will cause this field to + * be updated. + * @member {string} [metadata.sequenceNumber] The version of the property. + * Every time a property is modified, its sequence number is increased. + */ +export interface PropertyInfo { + name: string; + value?: PropertyValue; + metadata: PropertyMetadata; +} + +/** + * @class + * Initializes a new instance of the PagedPropertyInfoList class. + * @constructor + * 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. * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {boolean} [isConsistent] Indicates whether any property under the + * given name has been modified during the enumeration. If there was a + * modification, this property value is false. + * @member {array} [properties] List of property information. + */ +export interface PagedPropertyInfoList { + continuationToken?: string; + isConsistent?: boolean; + properties?: PropertyInfo[]; +} + +/** + * @class + * Initializes a new instance of the PropertyDescription class. + * @constructor + * Description of a Service Fabric property. * - * @member {string} taskId The ID of the repair task. - * @member {string} [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. - * @member {string} [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. - * @member {string} state The workflow state of the repair task. Valid initial - * states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' - * @member {number} [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 - * @member {string} action The requested repair action. Must be specified when - * the repair task is created, and is immutable once set. - * @member {object} [target] - * @member {string} [target.kind] Polymorphic Discriminator - * @member {string} [executor] The name of the repair executor. Must be - * specified in Claimed and later states, and is immutable once set. - * @member {string} [executorData] A data string that the repair executor can - * use to store its internal state. - * @member {object} [impact] - * @member {string} [impact.kind] Polymorphic Discriminator - * @member {string} [resultStatus] 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. + * @member {string} propertyName The name of the Service Fabric property. + * @member {string} [customTypeId] The property's custom type id. Using this + * property, the user is able to tag the type of the value of the property. + * @member {object} value Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + */ +export interface PropertyDescription { + propertyName: string; + customTypeId?: string; + value: PropertyValue; +} + +/** + * @class + * Initializes a new instance of the PropertyBatchOperation class. + * @constructor + * Represents the base type for property operations that can be put into a + * batch and submitted. * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' - * @member {number} [resultCode] 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. - * @member {string} [resultDetails] 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. - * @member {object} [history] - * @member {date} [history.createdUtcTimestamp] The time when the repair task - * entered the Created state. - * @member {date} [history.claimedUtcTimestamp] The time when the repair task - * entered the Claimed state. - * @member {date} [history.preparingUtcTimestamp] The time when the repair task - * entered the Preparing state. - * @member {date} [history.approvedUtcTimestamp] The time when the repair task - * entered the Approved state - * @member {date} [history.executingUtcTimestamp] The time when the repair task - * entered the Executing state - * @member {date} [history.restoringUtcTimestamp] The time when the repair task - * entered the Restoring state - * @member {date} [history.completedUtcTimestamp] The time when the repair task - * entered the Completed state - * @member {date} [history.preparingHealthCheckStartUtcTimestamp] The time when - * the repair task started the health check in the Preparing state. - * @member {date} [history.preparingHealthCheckEndUtcTimestamp] The time when - * the repair task completed the health check in the Preparing state. - * @member {date} [history.restoringHealthCheckStartUtcTimestamp] The time when - * the repair task started the health check in the Restoring state. - * @member {date} [history.restoringHealthCheckEndUtcTimestamp] The time when - * the repair task completed the health check in the Restoring state. - * @member {string} [preparingHealthCheckState] Possible values include: - * 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - * @member {string} [restoringHealthCheckState] Possible values include: - * 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - * @member {boolean} [performPreparingHealthCheck] A value to determine if - * health checks will be performed when the repair task enters the Preparing - * state. - * @member {boolean} [performRestoringHealthCheck] A value to determine if - * health checks will be performed when the repair task enters the Restoring - * state. + * @member {string} propertyName The name of the Service Fabric property. + * @member {string} kind Polymorphic Discriminator */ -export interface RepairTask { - taskId: string; - version?: string; - description?: string; - state: string; - flags?: number; - action: string; - target?: RepairTargetDescriptionBase; - executor?: string; - executorData?: string; - impact?: RepairImpactDescriptionBase; - resultStatus?: string; - resultCode?: number; - resultDetails?: string; - history?: RepairTaskHistory; - preparingHealthCheckState?: string; - restoringHealthCheckState?: string; - performPreparingHealthCheck?: boolean; - performRestoringHealthCheck?: boolean; +export interface PropertyBatchOperation { + propertyName: string; + kind: string; } /** * @class - * Initializes a new instance of the RepairTaskApproveDescription class. + * Initializes a new instance of the PropertyBatchDescriptionList class. * @constructor - * Describes a request for forced approval of a repair task. + * Describes a list of property batch operations to be executed. Either all or + * none of the operations will be committed. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @member {array} [operations] A list of the property batch operations to be + * executed. + */ +export interface PropertyBatchDescriptionList { + operations?: PropertyBatchOperation[]; +} + +/** + * @class + * Initializes a new instance of the CheckExistsPropertyBatchOperation class. + * @constructor + * 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. * * - * @member {string} taskId The ID of the repair task. - * @member {string} [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. + * @member {boolean} exists Whether or not the property should exist for the + * operation to pass. */ -export interface RepairTaskApproveDescription { - taskId: string; - version?: string; +export interface CheckExistsPropertyBatchOperation extends PropertyBatchOperation { + exists: boolean; } /** * @class - * Initializes a new instance of the RepairTaskCancelDescription class. + * Initializes a new instance of the CheckSequencePropertyBatchOperation class. * @constructor - * Describes a request to cancel a repair task. + * 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. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. * - * - * @member {string} taskId The ID of the repair task. - * @member {string} [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. - * @member {boolean} [requestAbort] _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. + * @member {string} sequenceNumber The expected sequence number. */ -export interface RepairTaskCancelDescription { - taskId: string; - version?: string; - requestAbort?: boolean; +export interface CheckSequencePropertyBatchOperation extends PropertyBatchOperation { + sequenceNumber: string; } /** * @class - * Initializes a new instance of the RepairTaskDeleteDescription class. + * Initializes a new instance of the CheckValuePropertyBatchOperation class. * @constructor - * 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. + * 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. * * - * @member {string} taskId The ID of the completed repair task to be deleted. - * @member {string} [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. + * @member {object} value The expected property value. + * @member {string} [value.kind] Polymorphic Discriminator */ -export interface RepairTaskDeleteDescription { - taskId: string; - version?: string; +export interface CheckValuePropertyBatchOperation extends PropertyBatchOperation { + value: PropertyValue; } /** * @class - * Initializes a new instance of the RepairTaskUpdateHealthPolicyDescription class. + * Initializes a new instance of the DeletePropertyBatchOperation class. * @constructor - * 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. + * 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. * * - * @member {string} taskId The ID of the repair task to be updated. - * @member {string} [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. - * @member {boolean} [performPreparingHealthCheck] 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. - * @member {boolean} [performRestoringHealthCheck] 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. */ -export interface RepairTaskUpdateHealthPolicyDescription { - taskId: string; - version?: string; - performPreparingHealthCheck?: boolean; - performRestoringHealthCheck?: boolean; +export interface DeletePropertyBatchOperation extends PropertyBatchOperation { } /** * @class - * Initializes a new instance of the RepairTaskUpdateInfo class. + * Initializes a new instance of the GetPropertyBatchOperation class. * @constructor - * Describes the result of an operation that created or updated a repair task. + * 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. * - * This type supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * + * @member {boolean} [includeValue] 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 . + */ +export interface GetPropertyBatchOperation extends PropertyBatchOperation { + includeValue?: boolean; +} + +/** + * @class + * Initializes a new instance of the PutPropertyBatchOperation class. + * @constructor + * 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. * * - * @member {string} version The new version of the repair task. + * @member {object} value Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + * @member {string} [customTypeId] The property's custom type id. Using this + * property, the user is able to tag the type of the value of the property. */ -export interface RepairTaskUpdateInfo { - version: string; +export interface PutPropertyBatchOperation extends PropertyBatchOperation { + value: PropertyValue; + customTypeId?: string; +} + +/** + * @class + * Initializes a new instance of the PropertyBatchInfo class. + * @constructor + * Information about the results of a property batch. + * + * @member {string} kind Polymorphic Discriminator + */ +export interface PropertyBatchInfo { + kind: string; +} + +/** + * @class + * Initializes a new instance of the SuccessfulPropertyBatchInfo class. + * @constructor + * Derived from PropertyBatchInfo. Represents the property batch succeeding. + * Contains the results of any "Get" operations in the batch. + * + * @member {object} [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. + */ +export interface SuccessfulPropertyBatchInfo extends PropertyBatchInfo { + properties?: { [propertyName: string]: PropertyInfo }; +} + +/** + * @class + * Initializes a new instance of the FailedPropertyBatchInfo class. + * @constructor + * Derived from PropertyBatchInfo. Represents the property batch failing. + * Contains information about the specific batch failure. + * + * @member {string} [errorMessage] The error message of the failed operation. + * Describes the exception thrown due to the first unsuccessful operation in + * the property batch. + * @member {number} [operationIndex] The index of the unsuccessful operation in + * the property batch. + */ +export interface FailedPropertyBatchInfo extends PropertyBatchInfo { + errorMessage?: string; + operationIndex?: number; +} + +/** + * @class + * Initializes a new instance of the BackupScheduleDescription class. + * @constructor + * Describes the backup schedule parameters. + * + * @member {string} scheduleKind Polymorphic Discriminator + */ +export interface BackupScheduleDescription { + scheduleKind: string; +} + +/** + * @class + * Initializes a new instance of the BackupStorageDescription class. + * @constructor + * Describes the parameters for the backup storage. + * + * @member {string} [friendlyName] Friendly name for this backup storage. + * @member {string} storageKind Polymorphic Discriminator + */ +export interface BackupStorageDescription { + friendlyName?: string; + storageKind: string; +} + +/** + * @class + * Initializes a new instance of the BackupPolicyDescription class. + * @constructor + * Describes a backup policy for configuring periodic backup. + * + * @member {string} name The unique name identifying this backup policy. + * @member {boolean} autoRestoreOnDataLoss Specifies whether to trigger restore + * automatically using the latest available backup in case the partition + * experiences a data loss event. + * @member {number} maxIncrementalBackups 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. + * @member {object} schedule Describes the backup schedule parameters. + * @member {string} [schedule.scheduleKind] Polymorphic Discriminator + * @member {object} storage Describes the details of backup storage where to + * store the periodic backups. + * @member {string} [storage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [storage.storageKind] Polymorphic Discriminator + */ +export interface BackupPolicyDescription { + name: string; + autoRestoreOnDataLoss: boolean; + maxIncrementalBackups: number; + schedule: BackupScheduleDescription; + storage: BackupStorageDescription; +} + +/** + * @class + * Initializes a new instance of the PagedBackupPolicyDescriptionList class. + * @constructor + * 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. + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] The list of backup policies information. + */ +export interface PagedBackupPolicyDescriptionList { + continuationToken?: string; + items?: BackupPolicyDescription[]; +} + +/** + * @class + * Initializes a new instance of the BackupConfigurationInfo class. + * @constructor + * Describes the backup configuration information. + * + * @member {string} [policyName] The name of the backup policy which is + * applicable to this Service Fabric application or service or partition. + * @member {string} [policyInheritedFrom] Specifies the scope at which the + * backup policy is applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + * @member {object} [suspensionInfo] Describes the backup suspension details. + * @member {boolean} [suspensionInfo.isSuspended] Indicates whether periodic + * backup is suspended at this level or not. + * @member {string} [suspensionInfo.suspensionInheritedFrom] Specifies the + * scope at which the backup suspension was applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + * @member {string} kind Polymorphic Discriminator + */ +export interface BackupConfigurationInfo { + policyName?: string; + policyInheritedFrom?: string; + suspensionInfo?: BackupSuspensionInfo; + kind: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationBackupConfigurationInfo class. + * @constructor + * Backup configuration information for a specific Service Fabric application + * specifying what backup policy is being applied and suspend description, if + * any. + * + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + */ +export interface ApplicationBackupConfigurationInfo extends BackupConfigurationInfo { + applicationName?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceBackupConfigurationInfo class. + * @constructor + * Backup configuration information for a specific Service Fabric service + * specifying what backup policy is being applied and suspend description, if + * any. + * + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + */ +export interface ServiceBackupConfigurationInfo extends BackupConfigurationInfo { + serviceName?: string; +} + +/** + * @class + * Initializes a new instance of the BackupSuspensionInfo class. + * @constructor + * Describes the backup suspension details. + * + * + * @member {boolean} [isSuspended] Indicates whether periodic backup is + * suspended at this level or not. + * @member {string} [suspensionInheritedFrom] Specifies the scope at which the + * backup suspension was applied. + * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + */ +export interface BackupSuspensionInfo { + isSuspended?: boolean; + suspensionInheritedFrom?: string; +} + +/** + * @class + * Initializes a new instance of the PagedBackupConfigurationInfoList class. + * @constructor + * 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. + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup configuration information. + */ +export interface PagedBackupConfigurationInfoList { + continuationToken?: string; + items?: BackupConfigurationInfo[]; +} + +/** + * @class + * Initializes a new instance of the RestorePartitionDescription class. + * @constructor + * Specifies the parameters needed to trigger a restore of a specific + * partition. + * + * @member {uuid} backupId Unique backup ID. + * @member {string} backupLocation Location of the backup relative to the + * backup storage specified/ configured. + * @member {object} [backupStorage] Location of the backup from where the + * partition will be restored. + * @member {string} [backupStorage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [backupStorage.storageKind] Polymorphic Discriminator + */ +export interface RestorePartitionDescription { + backupId: string; + backupLocation: string; + backupStorage?: BackupStorageDescription; +} + +/** + * @class + * Initializes a new instance of the RestoreProgressInfo class. + * @constructor + * Describes the progress of a restore operation on a partition. + * + * @member {string} [restoreState] Represents the current state of the + * partition restore operation. + * . Possible values include: 'Invalid', 'Accepted', 'RestoreInProgress', + * 'Success', 'Failure', 'Timeout' + * @member {date} [timeStampUtc] Timestamp when operation succeeded or failed. + * @member {object} [restoredEpoch] Describes the epoch at which the partition + * is restored. + * @member {string} [restoredEpoch.configurationVersion] 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. + * @member {string} [restoredEpoch.dataLossVersion] The current dataloss 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. + * @member {string} [restoredLsn] Restored LSN. + * @member {object} [failureError] Denotes the failure encountered in + * performing restore operation. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ +export interface RestoreProgressInfo { + restoreState?: string; + timeStampUtc?: Date; + restoredEpoch?: Epoch; + restoredLsn?: string; + failureError?: FabricErrorError; +} + +/** + * @class + * Initializes a new instance of the BackupPartitionDescription class. + * @constructor + * Describes the parameters for triggering partition's backup. + * + * @member {object} [backupStorage] Specifies the details of the backup storage + * where to save the backup. + * @member {string} [backupStorage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [backupStorage.storageKind] Polymorphic Discriminator + */ +export interface BackupPartitionDescription { + backupStorage?: BackupStorageDescription; +} + +/** + * @class + * Initializes a new instance of the BackupInfo class. + * @constructor + * Represents a backup point which can be used to trigger a restore. + * + * @member {uuid} [backupId] Unique backup ID . + * @member {uuid} [backupChainId] 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. + * @member {string} [applicationName] Name of the Service Fabric application + * this partition backup belongs to. + * @member {string} [serviceName] Name of the Service Fabric service this + * partition backup belongs to. + * @member {object} [partitionInformation] Information about the partition to + * which this backup belongs to + * @member {uuid} [partitionInformation.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. + * @member {string} [partitionInformation.servicePartitionKind] Polymorphic + * Discriminator + * @member {string} [backupLocation] Location of the backup, relative to the + * backup store. + * @member {string} [backupType] Describes the type of backup, whether its full + * or incremental. + * . Possible values include: 'Invalid', 'Full', 'Incremental' + * @member {object} [epochOfLastBackupRecord] Epoch of the last record in this + * backup. + * @member {string} [epochOfLastBackupRecord.configurationVersion] 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. + * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * dataloss 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. + * @member {string} [lsnOfLastBackupRecord] LSN of the last record in this + * backup. + * @member {date} [creationTimeUtc] The date time when this backup was taken. + * @member {object} [failureError] Denotes the failure encountered in getting + * backup point information. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ +export interface BackupInfo { + backupId?: string; + backupChainId?: string; + applicationName?: string; + serviceName?: string; + partitionInformation?: PartitionInformation; + backupLocation?: string; + backupType?: string; + epochOfLastBackupRecord?: Epoch; + lsnOfLastBackupRecord?: string; + creationTimeUtc?: Date; + failureError?: FabricErrorError; +} + +/** + * @class + * Initializes a new instance of the PagedBackupInfoList class. + * @constructor + * 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. + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup information. + */ +export interface PagedBackupInfoList { + continuationToken?: string; + items?: BackupInfo[]; +} + +/** + * @class + * Initializes a new instance of the AzureBlobBackupStorageDescription class. + * @constructor + * Describes the parameters for Azure blob store used for storing and + * enumerating backups. + * + * @member {string} connectionString The connection string to connect to the + * Azure blob store. + * @member {string} containerName The name of the container in the blob store + * to store and enumerate backups from. + */ +export interface AzureBlobBackupStorageDescription extends BackupStorageDescription { + connectionString: string; + containerName: string; +} + +/** + * @class + * Initializes a new instance of the FileShareBackupStorageDescription class. + * @constructor + * Describes the parameters for file share storage used for storing or + * enumerating backups. + * + * @member {string} path UNC path of the file share where to store or enumerate + * backups from. + * @member {string} [primaryUserName] Primary user name to access the file + * share. + * @member {string} [primaryPassword] Primary password to access the share + * location. + * @member {string} [secondaryUserName] Secondary user name to access the file + * share. + * @member {string} [secondaryPassword] Secondary password to access the share + * location + */ +export interface FileShareBackupStorageDescription extends BackupStorageDescription { + path: string; + primaryUserName?: string; + primaryPassword?: string; + secondaryUserName?: string; + secondaryPassword?: string; +} + +/** + * @class + * Initializes a new instance of the FrequencyBasedBackupScheduleDescription class. + * @constructor + * Describes the frequency based backup schedule. + * + * @member {moment.duration} interval 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. + */ +export interface FrequencyBasedBackupScheduleDescription extends BackupScheduleDescription { + interval: moment.Duration; +} + +/** + * @class + * Initializes a new instance of the TimeBasedBackupScheduleDescription class. + * @constructor + * Describes the time based backup schedule. + * + * @member {string} scheduleFrequencyType Describes the frequency with which to + * run the time based backup schedule. + * . Possible values include: 'Invalid', 'Daily', 'Weekly' + * @member {array} [runDays] List of days of a week when to trigger the + * periodic backup. This is valid only when the backup schedule frequency type + * is weekly. + * @member {array} runTimes 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. + */ +export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescription { + scheduleFrequencyType: string; + runDays?: string[]; + runTimes: Date[]; +} + +/** + * @class + * Initializes a new instance of the BackupProgressInfo class. + * @constructor + * Describes the progress of a partition's backup. + * + * @member {string} [backupState] Represents the current state of the partition + * backup operation. + * . Possible values include: 'Invalid', 'Accepted', 'BackupInProgress', + * 'Success', 'Failure', 'Timeout' + * @member {date} [timeStampUtc] TimeStamp in UTC when operation succeeded or + * failed. + * @member {uuid} [backupId] Unique ID of the newly created backup. + * @member {string} [backupLocation] Location, relative to the backup store, of + * the newly created backup. + * @member {object} [epochOfLastBackupRecord] Specifies the epoch of the last + * record included in backup. + * @member {string} [epochOfLastBackupRecord.configurationVersion] 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. + * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * dataloss 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. + * @member {string} [lsnOfLastBackupRecord] The LSN of last record included in + * backup. + * @member {object} [failureError] Denotes the failure encountered in + * performing backup operation. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ +export interface BackupProgressInfo { + backupState?: string; + timeStampUtc?: Date; + backupId?: string; + backupLocation?: string; + epochOfLastBackupRecord?: Epoch; + lsnOfLastBackupRecord?: string; + failureError?: FabricErrorError; +} + +/** + * @class + * Initializes a new instance of the PartitionBackupConfigurationInfo class. + * @constructor + * Backup configuration information, for a specific partition, specifying what + * backup policy is being applied and suspend description, if any. + * + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for the + * lifetime of the service. If the same service was deleted and recreated the + * IDs of its partitions would be different. + */ +export interface PartitionBackupConfigurationInfo extends BackupConfigurationInfo { + serviceName?: string; + partitionId?: string; +} + +/** + * @class + * Initializes a new instance of the BackupEntity class. + * @constructor + * Describes the Service Fabric entity that is configured for backup. + * + * @member {string} entityKind Polymorphic Discriminator + */ +export interface BackupEntity { + entityKind: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationBackupEntity class. + * @constructor + * Identifies the Service Fabric application which is being backed up. + * + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + */ +export interface ApplicationBackupEntity extends BackupEntity { + applicationName?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceBackupEntity class. + * @constructor + * Identifies the Service Fabric stateful service which is being backed up. + * + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + */ +export interface ServiceBackupEntity extends BackupEntity { + serviceName?: string; +} + +/** + * @class + * Initializes a new instance of the PartitionBackupEntity class. + * @constructor + * Identifies the Service Fabric stateful partition which is being backed up. + * + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for the + * lifetime of the service. If the same service was deleted and recreated the + * IDs of its partitions would be different. + */ +export interface PartitionBackupEntity extends BackupEntity { + serviceName?: string; + partitionId?: string; +} + +/** + * @class + * Initializes a new instance of the EnableBackupDescription class. + * @constructor + * Specifies the parameters needed to enable periodic backup. + * + * @member {string} backupPolicyName Name of the backup policy to be used for + * enabling periodic backups. + */ +export interface EnableBackupDescription { + backupPolicyName: string; +} + +/** + * @class + * Initializes a new instance of the PagedBackupEntityList class. + * @constructor + * 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. + * + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup entity information. + */ +export interface PagedBackupEntityList { + continuationToken?: string; + items?: BackupEntity[]; +} + +/** + * @class + * Initializes a new instance of the GetBackupByStorageQueryDescription class. + * @constructor + * Describes additional filters to be applied, while listing backups, and + * backup storage details from where to fetch the backups. + * + * @member {date} [startDateTimeFilter] Specifies the start date time in + * ISO8601 from which to enumerate backups. If not specified, backups are + * enumerated from the beginning. + * @member {date} [endDateTimeFilter] Specifies the end date time in ISO8601 + * till which to enumerate backups. If not specified, backups are enumerated + * till the end. + * @member {boolean} [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 . + * @member {object} storage 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. + * @member {string} [storage.friendlyName] Friendly name for this backup + * storage. + * @member {string} [storage.storageKind] Polymorphic Discriminator + * @member {object} backupEntity Indicates the entity for which to enumerate + * backups. + * @member {string} [backupEntity.entityKind] Polymorphic Discriminator + */ +export interface GetBackupByStorageQueryDescription { + startDateTimeFilter?: Date; + endDateTimeFilter?: Date; + latest?: boolean; + storage: BackupStorageDescription; + backupEntity: BackupEntity; +} + +/** + * @class + * Initializes a new instance of the NodeImpact class. + * @constructor + * 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. + * + * + * @member {string} nodeName The name of the impacted node. + * @member {string} [impactLevel] The level of impact expected. Possible values + * include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' + */ +export interface NodeImpact { + nodeName: string; + impactLevel?: string; +} + +/** + * @class + * Initializes a new instance of the RepairImpactDescriptionBase class. + * @constructor + * 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. + * + * + * @member {string} kind Polymorphic Discriminator + */ +export interface RepairImpactDescriptionBase { + kind: string; +} + +/** + * @class + * Initializes a new instance of the NodeRepairImpactDescription class. + * @constructor + * 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. + * + * + * @member {array} [nodeImpactList] The list of nodes impacted by a repair + * action and their respective expected impact. + */ +export interface NodeRepairImpactDescription extends RepairImpactDescriptionBase { + nodeImpactList?: NodeImpact[]; +} + +/** + * @class + * Initializes a new instance of the RepairTargetDescriptionBase class. + * @constructor + * 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. + * + * + * @member {string} kind Polymorphic Discriminator + */ +export interface RepairTargetDescriptionBase { + kind: string; +} + +/** + * @class + * Initializes a new instance of the NodeRepairTargetDescription class. + * @constructor + * 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. + * + * + * @member {array} [nodeNames] The list of nodes targeted by a repair action. + */ +export interface NodeRepairTargetDescription extends RepairTargetDescriptionBase { + nodeNames?: string[]; +} + +/** + * @class + * Initializes a new instance of the RepairTaskHistory class. + * @constructor + * 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. + * + * + * @member {date} [createdUtcTimestamp] The time when the repair task entered + * the Created state. + * @member {date} [claimedUtcTimestamp] The time when the repair task entered + * the Claimed state. + * @member {date} [preparingUtcTimestamp] The time when the repair task entered + * the Preparing state. + * @member {date} [approvedUtcTimestamp] The time when the repair task entered + * the Approved state + * @member {date} [executingUtcTimestamp] The time when the repair task entered + * the Executing state + * @member {date} [restoringUtcTimestamp] The time when the repair task entered + * the Restoring state + * @member {date} [completedUtcTimestamp] The time when the repair task entered + * the Completed state + * @member {date} [preparingHealthCheckStartUtcTimestamp] The time when the + * repair task started the health check in the Preparing state. + * @member {date} [preparingHealthCheckEndUtcTimestamp] The time when the + * repair task completed the health check in the Preparing state. + * @member {date} [restoringHealthCheckStartUtcTimestamp] The time when the + * repair task started the health check in the Restoring state. + * @member {date} [restoringHealthCheckEndUtcTimestamp] The time when the + * repair task completed the health check in the Restoring state. + */ +export interface RepairTaskHistory { + createdUtcTimestamp?: Date; + claimedUtcTimestamp?: Date; + preparingUtcTimestamp?: Date; + approvedUtcTimestamp?: Date; + executingUtcTimestamp?: Date; + restoringUtcTimestamp?: Date; + completedUtcTimestamp?: Date; + preparingHealthCheckStartUtcTimestamp?: Date; + preparingHealthCheckEndUtcTimestamp?: Date; + restoringHealthCheckStartUtcTimestamp?: Date; + restoringHealthCheckEndUtcTimestamp?: Date; +} + +/** + * @class + * Initializes a new instance of the RepairTask class. + * @constructor + * 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. + * + * + * @member {string} taskId The ID of the repair task. + * @member {string} [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. + * @member {string} [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. + * @member {string} state 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' + * @member {number} [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 + * @member {string} action The requested repair action. Must be specified when + * the repair task is created, and is immutable once set. + * @member {object} [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. + * @member {string} [target.kind] Polymorphic Discriminator + * @member {string} [executor] The name of the repair executor. Must be + * specified in Claimed and later states, and is immutable once set. + * @member {string} [executorData] A data string that the repair executor can + * use to store its internal state. + * @member {object} [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. + * @member {string} [impact.kind] Polymorphic Discriminator + * @member {string} [resultStatus] 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' + * @member {number} [resultCode] 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. + * @member {string} [resultDetails] 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. + * @member {object} [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. + * @member {date} [history.createdUtcTimestamp] The time when the repair task + * entered the Created state. + * @member {date} [history.claimedUtcTimestamp] The time when the repair task + * entered the Claimed state. + * @member {date} [history.preparingUtcTimestamp] The time when the repair task + * entered the Preparing state. + * @member {date} [history.approvedUtcTimestamp] The time when the repair task + * entered the Approved state + * @member {date} [history.executingUtcTimestamp] The time when the repair task + * entered the Executing state + * @member {date} [history.restoringUtcTimestamp] The time when the repair task + * entered the Restoring state + * @member {date} [history.completedUtcTimestamp] The time when the repair task + * entered the Completed state + * @member {date} [history.preparingHealthCheckStartUtcTimestamp] The time when + * the repair task started the health check in the Preparing state. + * @member {date} [history.preparingHealthCheckEndUtcTimestamp] The time when + * the repair task completed the health check in the Preparing state. + * @member {date} [history.restoringHealthCheckStartUtcTimestamp] The time when + * the repair task started the health check in the Restoring state. + * @member {date} [history.restoringHealthCheckEndUtcTimestamp] The time when + * the repair task completed the health check in the Restoring state. + * @member {string} [preparingHealthCheckState] The workflow state of the + * health check when the repair task is in the Preparing state. Possible values + * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @member {string} [restoringHealthCheckState] The workflow state of the + * health check when the repair task is in the Restoring state. Possible values + * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @member {boolean} [performPreparingHealthCheck] A value to determine if + * health checks will be performed when the repair task enters the Preparing + * state. + * @member {boolean} [performRestoringHealthCheck] A value to determine if + * health checks will be performed when the repair task enters the Restoring + * state. + */ +export interface RepairTask { + taskId: string; + version?: string; + description?: string; + state: string; + flags?: number; + action: string; + target?: RepairTargetDescriptionBase; + executor?: string; + executorData?: string; + impact?: RepairImpactDescriptionBase; + resultStatus?: string; + resultCode?: number; + resultDetails?: string; + history?: RepairTaskHistory; + preparingHealthCheckState?: string; + restoringHealthCheckState?: string; + performPreparingHealthCheck?: boolean; + performRestoringHealthCheck?: boolean; +} + +/** + * @class + * Initializes a new instance of the RepairTaskApproveDescription class. + * @constructor + * 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. + * + * + * @member {string} taskId The ID of the repair task. + * @member {string} [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. + */ +export interface RepairTaskApproveDescription { + taskId: string; + version?: string; +} + +/** + * @class + * Initializes a new instance of the RepairTaskCancelDescription class. + * @constructor + * 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. + * + * + * @member {string} taskId The ID of the repair task. + * @member {string} [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. + * @member {boolean} [requestAbort] _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. + */ +export interface RepairTaskCancelDescription { + taskId: string; + version?: string; + requestAbort?: boolean; +} + +/** + * @class + * Initializes a new instance of the RepairTaskDeleteDescription class. + * @constructor + * 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. + * + * + * @member {string} taskId The ID of the completed repair task to be deleted. + * @member {string} [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. + */ +export interface RepairTaskDeleteDescription { + taskId: string; + version?: string; +} + +/** + * @class + * Initializes a new instance of the RepairTaskUpdateHealthPolicyDescription class. + * @constructor + * 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. + * + * + * @member {string} taskId The ID of the repair task to be updated. + * @member {string} [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. + * @member {boolean} [performPreparingHealthCheck] 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. + * @member {boolean} [performRestoringHealthCheck] 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. + */ +export interface RepairTaskUpdateHealthPolicyDescription { + taskId: string; + version?: string; + performPreparingHealthCheck?: boolean; + performRestoringHealthCheck?: boolean; +} + +/** + * @class + * Initializes a new instance of the RepairTaskUpdateInfo class. + * @constructor + * 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. + * + * + * @member {string} version The new version of the repair task. + */ +export interface RepairTaskUpdateInfo { + version: string; +} + +/** + * @class + * Initializes a new instance of the UploadChunkRange class. + * @constructor + * Information about which portion of the file to upload. + * + * @member {string} [startPosition] The start position of the portion of the + * file. It's represented by the number of bytes. + * @member {string} [endPosition] The end position of the portion of the file. + * It's represented by the number of bytes. + */ +export interface UploadChunkRange { + startPosition?: string; + endPosition?: string; +} + +/** + * @class + * Initializes a new instance of the UploadSessionInfo class. + * @constructor + * Information about an image store upload session. A session is associated + * with a relative path in the image store. + * + * @member {string} [storeRelativePath] The remote location within image store. + * This path is relative to the image store root. + * @member {uuid} [sessionId] A unique ID of the upload session. A session ID + * can be reused only if the session was committed or removed. + * @member {date} [modifiedDate] The date and time when the upload session was + * last modified. + * @member {string} [fileSize] The size in bytes of the uploading file. + * @member {array} [expectedRanges] List of chunk ranges that image store has + * not received yet. + */ +export interface UploadSessionInfo { + storeRelativePath?: string; + sessionId?: string; + modifiedDate?: Date; + fileSize?: string; + expectedRanges?: UploadChunkRange[]; +} + +/** + * @class + * Initializes a new instance of the UploadSession class. + * @constructor + * Information about a image store upload session + * + * @member {array} [uploadSessions] 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. + */ +export interface UploadSession { + uploadSessions?: UploadSessionInfo[]; +} + +/** + * @class + * Initializes a new instance of the ContainerLogs class. + * @constructor + * Container logs. + * + * @member {string} [content] Container logs. + */ +export interface ContainerLogs { + content?: string; +} + +/** + * @class + * Initializes a new instance of the AveragePartitionLoadScalingTrigger class. + * @constructor + * Represents a scaling trigger related to an average load of a metric/resource + * of a partition. + * + * @member {string} metricName The name of the metric for which usage should be + * tracked. + * @member {string} lowerLoadThreshold The lower limit of the load below which + * a scale in operation should be performed. + * @member {string} upperLoadThreshold The upper limit of the load beyond which + * a scale out operation should be performed. + * @member {number} scaleIntervalInSeconds The period in seconds on which a + * decision is made whether to scale or not. + */ +export interface AveragePartitionLoadScalingTrigger extends ScalingTriggerDescription { + metricName: string; + lowerLoadThreshold: string; + upperLoadThreshold: string; + scaleIntervalInSeconds: number; +} + +/** + * @class + * Initializes a new instance of the AverageServiceLoadScalingTrigger class. + * @constructor + * Represents a scaling policy related to an average load of a metric/resource + * of a service. + * + * @member {string} metricName The name of the metric for which usage should be + * tracked. + * @member {string} lowerLoadThreshold The lower limit of the load below which + * a scale in operation should be performed. + * @member {string} upperLoadThreshold The upper limit of the load beyond which + * a scale out operation should be performed. + * @member {number} scaleIntervalInSeconds The period in seconds on which a + * decision is made whether to scale or not. + */ +export interface AverageServiceLoadScalingTrigger extends ScalingTriggerDescription { + metricName: string; + lowerLoadThreshold: string; + upperLoadThreshold: string; + scaleIntervalInSeconds: number; +} + +/** + * @class + * Initializes a new instance of the PartitionInstanceCountScaleMechanism class. + * @constructor + * Represents a scaling mechanism for adding or removing instances of stateless + * service partition. + * + * @member {number} minInstanceCount Minimum number of instances of the + * partition. + * @member {number} maxInstanceCount Maximum number of instances of the + * partition. + * @member {number} scaleIncrement The number of instances to add or remove + * during a scaling operation. + */ +export interface PartitionInstanceCountScaleMechanism extends ScalingMechanismDescription { + minInstanceCount: number; + maxInstanceCount: number; + scaleIncrement: number; +} + +/** + * @class + * Initializes a new instance of the AddRemoveIncrementalNamedPartitionScalingMechanism class. + * @constructor + * Represents a scaling mechanism for adding or removing named partitions of a + * stateless service. Partition names are in the format '0','1''N-1' + * + * @member {number} minPartitionCount Minimum number of named partitions of the + * service. + * @member {number} maxPartitionCount Maximum number of named partitions of the + * service. + * @member {number} scaleIncrement The number of instances to add or remove + * during a scaling operation. + */ +export interface AddRemoveIncrementalNamedPartitionScalingMechanism extends ScalingMechanismDescription { + minPartitionCount: number; + maxPartitionCount: number; + scaleIncrement: number; +} + +/** + * @class + * Initializes a new instance of the ApplicationCreatedEvent class. + * @constructor + * Application Created event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {string} applicationDefinitionKind Application definition kind. + */ +export interface ApplicationCreatedEvent extends ApplicationEvent { + applicationTypeName: string; + applicationTypeVersion: string; + applicationDefinitionKind: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationDeletedEvent class. + * @constructor + * Application Deleted event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + */ +export interface ApplicationDeletedEvent extends ApplicationEvent { + applicationTypeName: string; + applicationTypeVersion: string; +} + +/** + * @class + * Initializes a new instance of the ApplicationHealthReportCreatedEvent class. + * @constructor + * Application Health Report Created event. + * + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ApplicationHealthReportCreatedEvent extends ApplicationEvent { + applicationInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ApplicationHealthReportExpiredEvent class. + * @constructor + * Application Health Report Expired event. + * + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ApplicationHealthReportExpiredEvent extends ApplicationEvent { + applicationInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ApplicationUpgradeCompleteEvent class. + * @constructor + * Application Upgrade Complete event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ +export interface ApplicationUpgradeCompleteEvent extends ApplicationEvent { + applicationTypeName: string; + applicationTypeVersion: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ApplicationUpgradeDomainCompleteEvent class. + * @constructor + * Application Upgrade Domain Complete event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} upgradeState State of upgrade. + * @member {string} upgradeDomains Upgrade domains. + * @member {number} upgradeDomainElapsedTimeInMs Upgrade time of domain in + * milli-seconds. + */ +export interface ApplicationUpgradeDomainCompleteEvent extends ApplicationEvent { + applicationTypeName: string; + currentApplicationTypeVersion: string; + applicationTypeVersion: string; + upgradeState: string; + upgradeDomains: string; + upgradeDomainElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ApplicationUpgradeRollbackCompleteEvent class. + * @constructor + * Application Upgrade Rollback Complete event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} applicationTypeVersion Application type version. + * @member {string} failureReason Describes reason of failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ +export interface ApplicationUpgradeRollbackCompleteEvent extends ApplicationEvent { + applicationTypeName: string; + applicationTypeVersion: string; + failureReason: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ApplicationUpgradeRollbackStartEvent class. + * @constructor + * Application Upgrade Rollback Start event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} failureReason Describes reason of failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall upgrade time in + * milli-seconds. + */ +export interface ApplicationUpgradeRollbackStartEvent extends ApplicationEvent { + applicationTypeName: string; + currentApplicationTypeVersion: string; + applicationTypeVersion: string; + failureReason: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ApplicationUpgradeStartEvent class. + * @constructor + * Application Upgrade Start event. + * + * @member {string} applicationTypeName Application type name. + * @member {string} currentApplicationTypeVersion Current Application type + * version. + * @member {string} applicationTypeVersion Target Application type version. + * @member {string} upgradeType Type of upgrade. + * @member {string} rollingUpgradeMode Mode of upgrade. + * @member {string} failureAction Action if failed. + */ +export interface ApplicationUpgradeStartEvent extends ApplicationEvent { + applicationTypeName: string; + currentApplicationTypeVersion: string; + applicationTypeVersion: string; + upgradeType: string; + rollingUpgradeMode: string; + failureAction: string; +} + +/** + * @class + * Initializes a new instance of the DeployedApplicationHealthReportCreatedEvent class. + * @constructor + * Deployed Application Health Report Created event. + * + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface DeployedApplicationHealthReportCreatedEvent extends ApplicationEvent { + applicationInstanceId: number; + nodeName: string; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the DeployedApplicationHealthReportExpiredEvent class. + * @constructor + * Deployed Application Health Report Expired event. + * + * @member {number} applicationInstanceId Id of Application instance. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface DeployedApplicationHealthReportExpiredEvent extends ApplicationEvent { + applicationInstanceId: number; + nodeName: string; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ProcessDeactivatedEvent class. + * @constructor + * Process Deactivated event. + * + * @member {string} serviceName Name of Service. + * @member {string} servicePackageName Name of Service package. + * @member {string} servicePackageActivationId Activation Id of Service + * package. + * @member {boolean} isExclusive Indicates IsExclusive flag. + * @member {string} codePackageName Name of Code package. + * @member {string} entryPointType Type of EntryPoint. + * @member {string} exeName Name of executable. + * @member {number} processId Process Id. + * @member {string} hostId Host Id. + * @member {number} exitCode Exit code of process. + * @member {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @member {date} startTime Start time of process. + */ +export interface ProcessDeactivatedEvent extends ApplicationEvent { + serviceName: string; + servicePackageName: string; + servicePackageActivationId: string; + isExclusive: boolean; + codePackageName: string; + entryPointType: string; + exeName: string; + processId: number; + hostId: string; + exitCode: number; + unexpectedTermination: boolean; + startTime: Date; +} + +/** + * @class + * Initializes a new instance of the ContainerDeactivatedEvent class. + * @constructor + * Container Deactivated event. + * + * @member {string} serviceName Name of Service. + * @member {string} servicePackageName Name of Service package. + * @member {string} servicePackageActivationId Activation Id of Service + * package. + * @member {boolean} isExclusive Indicates IsExclusive flag. + * @member {string} codePackageName Name of Code package. + * @member {string} entryPointType Type of EntryPoint. + * @member {string} imageName Name of Container image. + * @member {string} containerName Name of Container. + * @member {string} hostId Host Id. + * @member {number} exitCode Exit code of process. + * @member {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @member {date} startTime Start time of process. + */ +export interface ContainerDeactivatedEvent extends ApplicationEvent { + serviceName: string; + servicePackageName: string; + servicePackageActivationId: string; + isExclusive: boolean; + codePackageName: string; + entryPointType: string; + imageName: string; + containerName: string; + hostId: string; + exitCode: number; + unexpectedTermination: boolean; + startTime: Date; +} + +/** + * @class + * Initializes a new instance of the NodeAbortedEvent class. + * @constructor + * Node Aborted event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ +export interface NodeAbortedEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; +} + +/** + * @class + * Initializes a new instance of the NodeAbortingEvent class. + * @constructor + * Node Aborting event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ +export interface NodeAbortingEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; +} + +/** + * @class + * Initializes a new instance of the NodeAddedEvent class. + * @constructor + * Node Added event. + * + * @member {string} nodeId Id of Node. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeType Type of Node. + * @member {string} fabricVersion Fabric version. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} nodeCapacities Capacities. + */ +export interface NodeAddedEvent extends NodeEvent { + nodeId: string; + nodeInstance: number; + nodeType: string; + fabricVersion: string; + ipAddressOrFQDN: string; + nodeCapacities: string; +} + +/** + * @class + * Initializes a new instance of the NodeCloseEvent class. + * @constructor + * Node Close event. + * + * @member {string} nodeId Id of Node. + * @member {string} nodeInstance Id of Node instance. + * @member {string} error Describes error. + */ +export interface NodeCloseEvent extends NodeEvent { + nodeId: string; + nodeInstance: string; + error: string; +} + +/** + * @class + * Initializes a new instance of the NodeClosingEvent class. + * @constructor + * Node Closing event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ +export interface NodeClosingEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; +} + +/** + * @class + * Initializes a new instance of the NodeDeactivateCompleteEvent class. + * @constructor + * Node Deactivate Complete event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} effectiveDeactivateIntent Describes deactivate intent. + * @member {string} batchIdsWithDeactivateIntent Batch Ids. + * @member {date} startTime Start time. + */ +export interface NodeDeactivateCompleteEvent extends NodeEvent { + nodeInstance: number; + effectiveDeactivateIntent: string; + batchIdsWithDeactivateIntent: string; + startTime: Date; +} + +/** + * @class + * Initializes a new instance of the NodeDeactivateStartEvent class. + * @constructor + * Node Deactivate Start event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} batchId Batch Id. + * @member {string} deactivateIntent Describes deactivate intent. + */ +export interface NodeDeactivateStartEvent extends NodeEvent { + nodeInstance: number; + batchId: string; + deactivateIntent: string; +} + +/** + * @class + * Initializes a new instance of the NodeDownEvent class. + * @constructor + * Node Down event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {date} lastNodeUpAt Time when Node was last up. + */ +export interface NodeDownEvent extends NodeEvent { + nodeInstance: number; + lastNodeUpAt: Date; +} + +/** + * @class + * Initializes a new instance of the NodeHealthReportCreatedEvent class. + * @constructor + * Node Health Report Created event. + * + * @member {number} nodeInstanceId Id of Node instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface NodeHealthReportCreatedEvent extends NodeEvent { + nodeInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the NodeHealthReportExpiredEvent class. + * @constructor + * Node Health Report Expired event. + * + * @member {number} nodeInstanceId Id of Node instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface NodeHealthReportExpiredEvent extends NodeEvent { + nodeInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the NodeOpenedSuccessEvent class. + * @constructor + * Node Opened Success event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ +export interface NodeOpenedSuccessEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; +} + +/** + * @class + * Initializes a new instance of the NodeOpenFailedEvent class. + * @constructor + * Node Open Failed event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + * @member {string} error Describes the error. + */ +export interface NodeOpenFailedEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; + error: string; +} + +/** + * @class + * Initializes a new instance of the NodeOpeningEvent class. + * @constructor + * Node Opening event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ +export interface NodeOpeningEvent extends NodeEvent { + nodeInstance: number; + nodeId: string; + upgradeDomain: string; + faultDomain: string; + ipAddressOrFQDN: string; + hostname: string; + isSeedNode: boolean; + nodeVersion: string; +} + +/** + * @class + * Initializes a new instance of the NodeRemovedEvent class. + * @constructor + * Node Removed event. + * + * @member {string} nodeId Id of Node. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeType Type of Node. + * @member {string} fabricVersion Fabric version. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} nodeCapacities Capacities. + */ +export interface NodeRemovedEvent extends NodeEvent { + nodeId: string; + nodeInstance: number; + nodeType: string; + fabricVersion: string; + ipAddressOrFQDN: string; + nodeCapacities: string; +} + +/** + * @class + * Initializes a new instance of the NodeUpEvent class. + * @constructor + * Node Up event. + * + * @member {number} nodeInstance Id of Node instance. + * @member {date} lastNodeDownAt Time when Node was last down. + */ +export interface NodeUpEvent extends NodeEvent { + nodeInstance: number; + lastNodeDownAt: Date; +} + +/** + * @class + * Initializes a new instance of the PartitionHealthReportCreatedEvent class. + * @constructor + * Partition Health Report Created event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface PartitionHealthReportCreatedEvent extends PartitionEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the PartitionHealthReportExpiredEvent class. + * @constructor + * Partition Health Report Expired event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface PartitionHealthReportExpiredEvent extends PartitionEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the PartitionReconfigurationCompletedEvent class. + * @constructor + * Partition Reconfiguration Completed event. + * + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} nodeInstanceId Id of Node instance. + * @member {string} serviceType Type of Service. + * @member {number} ccEpochDataLossVersion CcEpochDataLoss version. + * @member {number} ccEpochConfigVersion CcEpochConfig version. + * @member {string} reconfigType Type of reconfiguration. + * @member {string} result Describes reconfiguration result. + * @member {number} phase0DurationMs Duration of Phase0 in milli-seconds. + * @member {number} phase1DurationMs Duration of Phase1 in milli-seconds. + * @member {number} phase2DurationMs Duration of Phase2 in milli-seconds. + * @member {number} phase3DurationMs Duration of Phase3 in milli-seconds. + * @member {number} phase4DurationMs Duration of Phase4 in milli-seconds. + * @member {number} totalDurationMs Total duration in milli-seconds. + */ +export interface PartitionReconfigurationCompletedEvent extends PartitionEvent { + nodeName: string; + nodeInstanceId: string; + serviceType: string; + ccEpochDataLossVersion: number; + ccEpochConfigVersion: number; + reconfigType: string; + result: string; + phase0DurationMs: number; + phase1DurationMs: number; + phase2DurationMs: number; + phase3DurationMs: number; + phase4DurationMs: number; + totalDurationMs: number; +} + +/** + * @class + * Initializes a new instance of the PartitionPrimaryMoveAnalysisEvent class. + * @constructor + * Partition Primary Move Analysis event. + * + * @member {date} whenMoveCompleted Time when the move was completed. + * @member {string} previousNode The name of a Service Fabric node. + * @member {string} currentNode The name of a Service Fabric node. + * @member {string} moveReason Move reason. + * @member {string} relevantTraces Relevant traces. + */ +export interface PartitionPrimaryMoveAnalysisEvent extends PartitionAnalysisEvent { + whenMoveCompleted: Date; + previousNode: string; + currentNode: string; + moveReason: string; + relevantTraces: string; +} + +/** + * @class + * Initializes a new instance of the ServiceCreatedEvent class. + * @constructor + * Service Created event. + * + * @member {string} serviceTypeName Service type name. + * @member {string} applicationName Application name. + * @member {string} applicationTypeName Application type name. + * @member {number} serviceInstance Id of Service instance. + * @member {boolean} isStateful Indicates if Service is stateful. + * @member {number} partitionCount Number of partitions. + * @member {number} targetReplicaSetSize Size of target replicas set. + * @member {number} minReplicaSetSize Minimum size of replicas set. + * @member {string} servicePackageVersion Version of Service package. + * @member {uuid} partitionId An internal ID used by Service Fabric to uniquely + * identify a partition. This is a randomly generated GUID when the service was + * created. The partition ID is unique and does not change for the lifetime of + * the service. If the same service was deleted and recreated the IDs of its + * partitions would be different. + */ +export interface ServiceCreatedEvent extends ServiceEvent { + serviceTypeName: string; + applicationName: string; + applicationTypeName: string; + serviceInstance: number; + isStateful: boolean; + partitionCount: number; + targetReplicaSetSize: number; + minReplicaSetSize: number; + servicePackageVersion: string; + partitionId: string; +} + +/** + * @class + * Initializes a new instance of the ServiceDeletedEvent class. + * @constructor + * Service Deleted event. + * + * @member {string} serviceTypeName Service type name. + * @member {string} applicationName Application name. + * @member {string} applicationTypeName Application type name. + * @member {number} serviceInstance Id of Service instance. + * @member {boolean} isStateful Indicates if Service is stateful. + * @member {number} partitionCount Number of partitions. + * @member {number} targetReplicaSetSize Size of target replicas set. + * @member {number} minReplicaSetSize Minimum size of replicas set. + * @member {string} servicePackageVersion Version of Service package. + */ +export interface ServiceDeletedEvent extends ServiceEvent { + serviceTypeName: string; + applicationName: string; + applicationTypeName: string; + serviceInstance: number; + isStateful: boolean; + partitionCount: number; + targetReplicaSetSize: number; + minReplicaSetSize: number; + servicePackageVersion: string; +} + +/** + * @class + * Initializes a new instance of the ServiceHealthReportCreatedEvent class. + * @constructor + * Service Health Report Created event. + * + * @member {number} instanceId Id of Service instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ServiceHealthReportCreatedEvent extends ServiceEvent { + instanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ServiceHealthReportExpiredEvent class. + * @constructor + * Service Health Report Expired event. + * + * @member {number} instanceId Id of Service instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ServiceHealthReportExpiredEvent extends ServiceEvent { + instanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the DeployedServiceHealthReportCreatedEvent class. + * @constructor + * Deployed Service Health Report Created event. + * + * @member {string} serviceManifestName Service manifest name. + * @member {number} servicePackageInstanceId Id of Service package instance. + * @member {string} servicePackageActivationId Id of Service package + * activation. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} tTLTimespan Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface DeployedServiceHealthReportCreatedEvent extends ApplicationEvent { + serviceManifestName: string; + servicePackageInstanceId: number; + servicePackageActivationId: string; + nodeName: string; + sourceId: string; + property: string; + healthState: string; + tTLTimespan: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the DeployedServiceHealthReportExpiredEvent class. + * @constructor + * Deployed Service Health Report Expired event. + * + * @member {string} serviceManifest Service manifest name. + * @member {number} servicePackageInstanceId Id of Service package instance. + * @member {string} servicePackageActivationId Id of Service package + * activation. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} tTLTimespan Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface DeployedServiceHealthReportExpiredEvent extends ApplicationEvent { + serviceManifest: string; + servicePackageInstanceId: number; + servicePackageActivationId: string; + nodeName: string; + sourceId: string; + property: string; + healthState: string; + tTLTimespan: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the StatefulReplicaHealthReportCreatedEvent class. + * @constructor + * Stateful Replica Health Report Created event. + * + * @member {number} replicaInstanceId Id of Replica instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface StatefulReplicaHealthReportCreatedEvent extends ReplicaEvent { + replicaInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the StatefulReplicaHealthReportExpiredEvent class. + * @constructor + * Stateful Replica Health Report Expired event. + * + * @member {number} replicaInstanceId Id of Replica instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface StatefulReplicaHealthReportExpiredEvent extends ReplicaEvent { + replicaInstanceId: number; + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the StatelessReplicaHealthReportCreatedEvent class. + * @constructor + * Stateless Replica Health Report Created event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface StatelessReplicaHealthReportCreatedEvent extends ReplicaEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the StatelessReplicaHealthReportExpiredEvent class. + * @constructor + * Stateless Replica Health Report Expired event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface StatelessReplicaHealthReportExpiredEvent extends ReplicaEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ClusterHealthReportCreatedEvent class. + * @constructor + * Cluster Health Report Created event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ClusterHealthReportCreatedEvent extends ClusterEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ClusterHealthReportExpiredEvent class. + * @constructor + * Cluster Health Report Expired event. + * + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ +export interface ClusterHealthReportExpiredEvent extends ClusterEvent { + sourceId: string; + property: string; + healthState: string; + timeToLiveMs: number; + sequenceNumber: number; + description: string; + removeWhenExpired: boolean; + sourceUtcTimestamp: Date; +} + +/** + * @class + * Initializes a new instance of the ClusterUpgradeCompleteEvent class. + * @constructor + * Cluster Upgrade Complete event. + * + * @member {string} targetClusterVersion Target Cluster version. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ +export interface ClusterUpgradeCompleteEvent extends ClusterEvent { + targetClusterVersion: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ClusterUpgradeDomainCompleteEvent class. + * @constructor + * Cluster Upgrade Domain Complete event. + * + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} upgradeState State of upgrade. + * @member {string} upgradeDomains Upgrade domains. + * @member {number} upgradeDomainElapsedTimeInMs Duration of domain upgrade in + * milli-seconds. + */ +export interface ClusterUpgradeDomainCompleteEvent extends ClusterEvent { + targetClusterVersion: string; + upgradeState: string; + upgradeDomains: string; + upgradeDomainElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ClusterUpgradeRollbackCompleteEvent class. + * @constructor + * Cluster Upgrade Rollback Complete event. + * + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} failureReason Describes failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ +export interface ClusterUpgradeRollbackCompleteEvent extends ClusterEvent { + targetClusterVersion: string; + failureReason: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ClusterUpgradeRollbackStartEvent class. + * @constructor + * Cluster Upgrade Rollback Start event. + * + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} failureReason Describes failure. + * @member {number} overallUpgradeElapsedTimeInMs Overall duration of upgrade + * in milli-seconds. + */ +export interface ClusterUpgradeRollbackStartEvent extends ClusterEvent { + targetClusterVersion: string; + failureReason: string; + overallUpgradeElapsedTimeInMs: number; +} + +/** + * @class + * Initializes a new instance of the ClusterUpgradeStartEvent class. + * @constructor + * Cluster Upgrade Start event. + * + * @member {string} currentClusterVersion Current Cluster version. + * @member {string} targetClusterVersion Target Cluster version. + * @member {string} upgradeType Type of upgrade. + * @member {string} rollingUpgradeMode Mode of upgrade. + * @member {string} failureAction Action if failed. + */ +export interface ClusterUpgradeStartEvent extends ClusterEvent { + currentClusterVersion: string; + targetClusterVersion: string; + upgradeType: string; + rollingUpgradeMode: string; + failureAction: string; +} + +/** + * @class + * Initializes a new instance of the ChaosStoppedEvent class. + * @constructor + * Chaos Stopped event. + * + * @member {string} reason Describes reason. + */ +export interface ChaosStoppedEvent extends ClusterEvent { + reason: string; +} + +/** + * @class + * Initializes a new instance of the ChaosStartedEvent class. + * @constructor + * Chaos Started event. + * + * @member {number} maxConcurrentFaults Maximum number of concurrent faults. + * @member {number} timeToRunInSeconds Time to run in seconds. + * @member {number} maxClusterStabilizationTimeoutInSeconds Maximum timeout for + * cluster stabilization in seconds. + * @member {number} waitTimeBetweenIterationsInSeconds Wait time between + * iterations in seconds. + * @member {number} waitTimeBetweenFautlsInSeconds Wait time between faults in + * seconds. + * @member {boolean} moveReplicaFaultEnabled Indicates MoveReplica fault is + * enabled. + * @member {string} includedNodeTypeList List of included Node types. + * @member {string} includedApplicationList List of included Applications. + * @member {string} clusterHealthPolicy Health policy. + * @member {string} chaosContext Chaos Context. + */ +export interface ChaosStartedEvent extends ClusterEvent { + maxConcurrentFaults: number; + timeToRunInSeconds: number; + maxClusterStabilizationTimeoutInSeconds: number; + waitTimeBetweenIterationsInSeconds: number; + waitTimeBetweenFautlsInSeconds: number; + moveReplicaFaultEnabled: boolean; + includedNodeTypeList: string; + includedApplicationList: string; + clusterHealthPolicy: string; + chaosContext: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRestartNodeFaultCompletedEvent class. + * @constructor + * Chaos Restart Node Fault Completed event. + * + * @member {number} nodeInstanceId Id of Node instance. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + */ +export interface ChaosRestartNodeFaultCompletedEvent extends NodeEvent { + nodeInstanceId: number; + faultGroupId: string; + faultId: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRestartCodePackageFaultScheduledEvent class. + * @constructor + * Chaos Restart Code Package Fault Scheduled event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} serviceManifestName Service manifest name. + * @member {string} codePackageName Code package name. + * @member {string} servicePackageActivationId Id of Service package + * activation. + */ +export interface ChaosRestartCodePackageFaultScheduledEvent extends ApplicationEvent { + faultGroupId: string; + faultId: string; + nodeName: string; + serviceManifestName: string; + codePackageName: string; + servicePackageActivationId: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRestartCodePackageFaultCompletedEvent class. + * @constructor + * Chaos Restart Code Package Fault Completed event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} serviceManifestName Service manifest name. + * @member {string} codePackageName Code package name. + * @member {string} servicePackageActivationId Id of Service package + * activation. + */ +export interface ChaosRestartCodePackageFaultCompletedEvent extends ApplicationEvent { + faultGroupId: string; + faultId: string; + nodeName: string; + serviceManifestName: string; + codePackageName: string; + servicePackageActivationId: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRemoveReplicaFaultScheduledEvent class. + * @constructor + * Chaos Remove Replica Fault Scheduled event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ +export interface ChaosRemoveReplicaFaultScheduledEvent extends ReplicaEvent { + faultGroupId: string; + faultId: string; + serviceUri: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRemoveReplicaFaultCompletedEvent class. + * @constructor + * Chaos Remove Replica Fault Completed event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ +export interface ChaosRemoveReplicaFaultCompletedEvent extends ReplicaEvent { + faultGroupId: string; + faultId: string; + serviceUri: string; +} + +/** + * @class + * Initializes a new instance of the ChaosMoveSecondaryFaultScheduledEvent class. + * @constructor + * Chaos Move Secondary Fault Scheduled event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceName Service name. + * @member {string} sourceNode The name of a Service Fabric node. + * @member {string} destinationNode The name of a Service Fabric node. + * @member {boolean} forcedMove Indicates a forced move. + */ +export interface ChaosMoveSecondaryFaultScheduledEvent extends PartitionEvent { + faultGroupId: string; + faultId: string; + serviceName: string; + sourceNode: string; + destinationNode: string; + forcedMove: boolean; +} + +/** + * @class + * Initializes a new instance of the ChaosMovePrimaryFaultScheduledEvent class. + * @constructor + * Chaos Move Primary Fault Scheduled event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceName Service name. + * @member {string} nodeTo The name of a Service Fabric node. + * @member {boolean} forcedMove Indicates a forced move. + */ +export interface ChaosMovePrimaryFaultScheduledEvent extends PartitionEvent { + faultGroupId: string; + faultId: string; + serviceName: string; + nodeTo: string; + forcedMove: boolean; +} + +/** + * @class + * Initializes a new instance of the ChaosRestartReplicaFaultScheduledEvent class. + * @constructor + * Chaos Restart Replica Fault Scheduled event. + * + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + * @member {string} serviceUri Service name. + */ +export interface ChaosRestartReplicaFaultScheduledEvent extends ReplicaEvent { + faultGroupId: string; + faultId: string; + serviceUri: string; +} + +/** + * @class + * Initializes a new instance of the ChaosRestartNodeFaultScheduledEvent class. + * @constructor + * Chaos Restart Node Fault Scheduled event. + * + * @member {number} nodeInstanceId Id of Node instance. + * @member {uuid} faultGroupId Id of fault group. + * @member {uuid} faultId Id of fault. + */ +export interface ChaosRestartNodeFaultScheduledEvent extends NodeEvent { + nodeInstanceId: number; + faultGroupId: string; + faultId: string; } diff --git a/lib/services/serviceFabric/lib/models/index.js b/lib/services/serviceFabric/lib/models/index.js index 688a00c81c..8b389bc759 100644 --- a/lib/services/serviceFabric/lib/models/index.js +++ b/lib/services/serviceFabric/lib/models/index.js @@ -16,6 +16,9 @@ exports.AadMetadata = require('./aadMetadata'); exports.AadMetadataObject = require('./aadMetadataObject'); +exports.AnalysisEventMetadata = require('./analysisEventMetadata'); +exports.FabricEvent = require('./fabricEvent'); +exports.ApplicationEvent = require('./applicationEvent'); exports.EntityHealthState = require('./entityHealthState'); exports.ServiceHealthState = require('./serviceHealthState'); exports.DeployedApplicationHealthState = require('./deployedApplicationHealthState'); @@ -71,6 +74,7 @@ exports.CurrentUpgradeDomainProgressInfo = require('./currentUpgradeDomainProgre exports.FailureUpgradeDomainProgressInfo = require('./failureUpgradeDomainProgressInfo'); exports.ApplicationUpgradeProgressInfo = require('./applicationUpgradeProgressInfo'); exports.ClusterConfiguration = require('./clusterConfiguration'); +exports.ClusterEvent = require('./clusterEvent'); exports.NodeId = require('./nodeId'); exports.NodeHealthState = require('./nodeHealthState'); exports.ClusterHealth = require('./clusterHealth'); @@ -82,6 +86,10 @@ exports.ClusterHealthPolicy = require('./clusterHealthPolicy'); exports.ClusterHealthChunkQueryDescription = require('./clusterHealthChunkQueryDescription'); exports.ClusterHealthPolicies = require('./clusterHealthPolicies'); exports.ClusterManifest = require('./clusterManifest'); +exports.ContainerApiRequestBody = require('./containerApiRequestBody'); +exports.ContainerApiResult = require('./containerApiResult'); +exports.ContainerApiResponse = require('./containerApiResponse'); +exports.ContainerInstanceEvent = require('./containerInstanceEvent'); exports.DeactivationIntentDescription = require('./deactivationIntentDescription'); exports.DeltaNodesCheckHealthEvaluation = require('./deltaNodesCheckHealthEvaluation'); exports.DeployedServicePackageHealthState = require('./deployedServicePackageHealthState'); @@ -114,6 +122,7 @@ exports.NamedPartitionInformation = require('./namedPartitionInformation'); exports.NodeDeactivationTaskId = require('./nodeDeactivationTaskId'); exports.NodeDeactivationTask = require('./nodeDeactivationTask'); exports.NodeDeactivationInfo = require('./nodeDeactivationInfo'); +exports.NodeEvent = require('./nodeEvent'); exports.NodeHealth = require('./nodeHealth'); exports.NodeHealthEvaluation = require('./nodeHealthEvaluation'); exports.NodeInfo = require('./nodeInfo'); @@ -121,6 +130,7 @@ exports.NodeLoadMetricInformation = require('./nodeLoadMetricInformation'); exports.NodeLoadInfo = require('./nodeLoadInfo'); exports.NodesHealthEvaluation = require('./nodesHealthEvaluation'); exports.PagedApplicationInfoList = require('./pagedApplicationInfoList'); +exports.PagedDeployedApplicationInfoList = require('./pagedDeployedApplicationInfoList'); exports.PagedNodeInfoList = require('./pagedNodeInfoList'); exports.ServicePartitionInfo = require('./servicePartitionInfo'); exports.PagedServicePartitionInfoList = require('./pagedServicePartitionInfoList'); @@ -128,11 +138,16 @@ exports.ReplicaInfo = require('./replicaInfo'); exports.PagedReplicaInfoList = require('./pagedReplicaInfoList'); exports.ServiceInfo = require('./serviceInfo'); exports.PagedServiceInfoList = require('./pagedServiceInfoList'); +exports.PartitionEvent = require('./partitionEvent'); +exports.PartitionAnalysisEvent = require('./partitionAnalysisEvent'); exports.ReplicaHealthState = require('./replicaHealthState'); exports.PartitionHealth = require('./partitionHealth'); exports.PartitionHealthEvaluation = require('./partitionHealthEvaluation'); exports.PartitionHealthState = require('./partitionHealthState'); exports.ProvisionFabricDescription = require('./provisionFabricDescription'); +exports.ProvisionApplicationTypeDescriptionBase = require('./provisionApplicationTypeDescriptionBase'); +exports.ProvisionApplicationTypeDescription = require('./provisionApplicationTypeDescription'); +exports.ExternalStoreProvisionApplicationTypeDescription = require('./externalStoreProvisionApplicationTypeDescription'); exports.UnprovisionFabricDescription = require('./unprovisionFabricDescription'); exports.ResumeClusterUpgradeDescription = require('./resumeClusterUpgradeDescription'); exports.ClusterUpgradeHealthPolicyObject = require('./clusterUpgradeHealthPolicyObject'); @@ -144,10 +159,12 @@ exports.EnsureAvailabilitySafetyCheck = require('./ensureAvailabilitySafetyCheck exports.EnsurePartitionQurumSafetyCheck = require('./ensurePartitionQurumSafetyCheck'); exports.SeedNodeSafetyCheck = require('./seedNodeSafetyCheck'); exports.PartitionsHealthEvaluation = require('./partitionsHealthEvaluation'); +exports.ReplicaEvent = require('./replicaEvent'); exports.ReplicaHealth = require('./replicaHealth'); exports.ReplicaHealthEvaluation = require('./replicaHealthEvaluation'); exports.ReplicasHealthEvaluation = require('./replicasHealthEvaluation'); exports.RestartNodeDescription = require('./restartNodeDescription'); +exports.ServiceEvent = require('./serviceEvent'); exports.ServiceFromTemplateDescription = require('./serviceFromTemplateDescription'); exports.ServiceHealthEvaluation = require('./serviceHealthEvaluation'); exports.ServiceHealth = require('./serviceHealth'); @@ -189,17 +206,27 @@ exports.ClusterUpgradeDescriptionObject = require('./clusterUpgradeDescriptionOb exports.FailedUpgradeDomainProgressObject = require('./failedUpgradeDomainProgressObject'); exports.ClusterUpgradeProgressObject = require('./clusterUpgradeProgressObject'); exports.ClusterConfigurationUpgradeDescription = require('./clusterConfigurationUpgradeDescription'); +exports.UpgradeOrchestrationServiceState = require('./upgradeOrchestrationServiceState'); +exports.UpgradeOrchestrationServiceStateSummary = require('./upgradeOrchestrationServiceStateSummary'); exports.ApplicationTypeImageStorePath = require('./applicationTypeImageStorePath'); -exports.ApplicationTypeImageStoreVersion = require('./applicationTypeImageStoreVersion'); +exports.UnprovisionApplicationTypeDescriptionInfo = require('./unprovisionApplicationTypeDescriptionInfo'); exports.CodePackageEntryPointStatistics = require('./codePackageEntryPointStatistics'); exports.CodePackageEntryPoint = require('./codePackageEntryPoint'); exports.DeployedCodePackageInfo = require('./deployedCodePackageInfo'); -exports.ChaosContextMapItem = require('./chaosContextMapItem'); exports.ChaosContext = require('./chaosContext'); +exports.ChaosTargetFilter = require('./chaosTargetFilter'); exports.ChaosParameters = require('./chaosParameters'); +exports.Chaos = require('./chaos'); +exports.ChaosParametersDictionaryItem = require('./chaosParametersDictionaryItem'); exports.ChaosEvent = require('./chaosEvent'); exports.ChaosEventWrapper = require('./chaosEventWrapper'); -exports.ChaosReport = require('./chaosReport'); +exports.ChaosEventsSegment = require('./chaosEventsSegment'); +exports.ChaosScheduleJobActiveDaysOfWeek = require('./chaosScheduleJobActiveDaysOfWeek'); +exports.TimeOfDay = require('./timeOfDay'); +exports.TimeRange = require('./timeRange'); +exports.ChaosScheduleJob = require('./chaosScheduleJob'); +exports.ChaosSchedule = require('./chaosSchedule'); +exports.ChaosScheduleDescription = require('./chaosScheduleDescription'); exports.ExecutingFaultsChaosEvent = require('./executingFaultsChaosEvent'); exports.StartedChaosEvent = require('./startedChaosEvent'); exports.StoppedChaosEvent = require('./stoppedChaosEvent'); @@ -221,6 +248,9 @@ exports.PartitionSchemeDescription = require('./partitionSchemeDescription'); exports.NamedPartitionSchemeDescription = require('./namedPartitionSchemeDescription'); exports.SingletonPartitionSchemeDescription = require('./singletonPartitionSchemeDescription'); exports.UniformInt64RangePartitionSchemeDescription = require('./uniformInt64RangePartitionSchemeDescription'); +exports.ScalingTriggerDescription = require('./scalingTriggerDescription'); +exports.ScalingMechanismDescription = require('./scalingMechanismDescription'); +exports.ScalingPolicyDescription = require('./scalingPolicyDescription'); exports.ServiceDescription = require('./serviceDescription'); exports.StatefulServiceDescription = require('./statefulServiceDescription'); exports.StatelessServiceDescription = require('./statelessServiceDescription'); @@ -266,6 +296,56 @@ exports.PackageSharingPolicyInfo = require('./packageSharingPolicyInfo'); exports.DeployServicePackageToNodeDescription = require('./deployServicePackageToNodeDescription'); exports.ResumeApplicationUpgradeDescription = require('./resumeApplicationUpgradeDescription'); exports.ApplicationUpgradeUpdateDescription = require('./applicationUpgradeUpdateDescription'); +exports.NameDescription = require('./nameDescription'); +exports.PagedSubNameInfoList = require('./pagedSubNameInfoList'); +exports.PropertyValue = require('./propertyValue'); +exports.BinaryPropertyValue = require('./binaryPropertyValue'); +exports.Int64PropertyValue = require('./int64PropertyValue'); +exports.DoublePropertyValue = require('./doublePropertyValue'); +exports.StringPropertyValue = require('./stringPropertyValue'); +exports.GuidPropertyValue = require('./guidPropertyValue'); +exports.PropertyMetadata = require('./propertyMetadata'); +exports.PropertyInfo = require('./propertyInfo'); +exports.PagedPropertyInfoList = require('./pagedPropertyInfoList'); +exports.PropertyDescription = require('./propertyDescription'); +exports.PropertyBatchOperation = require('./propertyBatchOperation'); +exports.PropertyBatchDescriptionList = require('./propertyBatchDescriptionList'); +exports.CheckExistsPropertyBatchOperation = require('./checkExistsPropertyBatchOperation'); +exports.CheckSequencePropertyBatchOperation = require('./checkSequencePropertyBatchOperation'); +exports.CheckValuePropertyBatchOperation = require('./checkValuePropertyBatchOperation'); +exports.DeletePropertyBatchOperation = require('./deletePropertyBatchOperation'); +exports.GetPropertyBatchOperation = require('./getPropertyBatchOperation'); +exports.PutPropertyBatchOperation = require('./putPropertyBatchOperation'); +exports.PropertyBatchInfo = require('./propertyBatchInfo'); +exports.SuccessfulPropertyBatchInfo = require('./successfulPropertyBatchInfo'); +exports.FailedPropertyBatchInfo = require('./failedPropertyBatchInfo'); +exports.BackupScheduleDescription = require('./backupScheduleDescription'); +exports.BackupStorageDescription = require('./backupStorageDescription'); +exports.BackupPolicyDescription = require('./backupPolicyDescription'); +exports.PagedBackupPolicyDescriptionList = require('./pagedBackupPolicyDescriptionList'); +exports.BackupConfigurationInfo = require('./backupConfigurationInfo'); +exports.ApplicationBackupConfigurationInfo = require('./applicationBackupConfigurationInfo'); +exports.ServiceBackupConfigurationInfo = require('./serviceBackupConfigurationInfo'); +exports.BackupSuspensionInfo = require('./backupSuspensionInfo'); +exports.PagedBackupConfigurationInfoList = require('./pagedBackupConfigurationInfoList'); +exports.RestorePartitionDescription = require('./restorePartitionDescription'); +exports.RestoreProgressInfo = require('./restoreProgressInfo'); +exports.BackupPartitionDescription = require('./backupPartitionDescription'); +exports.BackupInfo = require('./backupInfo'); +exports.PagedBackupInfoList = require('./pagedBackupInfoList'); +exports.AzureBlobBackupStorageDescription = require('./azureBlobBackupStorageDescription'); +exports.FileShareBackupStorageDescription = require('./fileShareBackupStorageDescription'); +exports.FrequencyBasedBackupScheduleDescription = require('./frequencyBasedBackupScheduleDescription'); +exports.TimeBasedBackupScheduleDescription = require('./timeBasedBackupScheduleDescription'); +exports.BackupProgressInfo = require('./backupProgressInfo'); +exports.PartitionBackupConfigurationInfo = require('./partitionBackupConfigurationInfo'); +exports.BackupEntity = require('./backupEntity'); +exports.ApplicationBackupEntity = require('./applicationBackupEntity'); +exports.ServiceBackupEntity = require('./serviceBackupEntity'); +exports.PartitionBackupEntity = require('./partitionBackupEntity'); +exports.EnableBackupDescription = require('./enableBackupDescription'); +exports.PagedBackupEntityList = require('./pagedBackupEntityList'); +exports.GetBackupByStorageQueryDescription = require('./getBackupByStorageQueryDescription'); exports.NodeImpact = require('./nodeImpact'); exports.RepairImpactDescriptionBase = require('./repairImpactDescriptionBase'); exports.NodeRepairImpactDescription = require('./nodeRepairImpactDescription'); @@ -278,12 +358,83 @@ exports.RepairTaskCancelDescription = require('./repairTaskCancelDescription'); exports.RepairTaskDeleteDescription = require('./repairTaskDeleteDescription'); exports.RepairTaskUpdateHealthPolicyDescription = require('./repairTaskUpdateHealthPolicyDescription'); exports.RepairTaskUpdateInfo = require('./repairTaskUpdateInfo'); +exports.UploadChunkRange = require('./uploadChunkRange'); +exports.UploadSessionInfo = require('./uploadSessionInfo'); +exports.UploadSession = require('./uploadSession'); +exports.ContainerLogs = require('./containerLogs'); +exports.AveragePartitionLoadScalingTrigger = require('./averagePartitionLoadScalingTrigger'); +exports.AverageServiceLoadScalingTrigger = require('./averageServiceLoadScalingTrigger'); +exports.PartitionInstanceCountScaleMechanism = require('./partitionInstanceCountScaleMechanism'); +exports.AddRemoveIncrementalNamedPartitionScalingMechanism = require('./addRemoveIncrementalNamedPartitionScalingMechanism'); +exports.ApplicationCreatedEvent = require('./applicationCreatedEvent'); +exports.ApplicationDeletedEvent = require('./applicationDeletedEvent'); +exports.ApplicationHealthReportCreatedEvent = require('./applicationHealthReportCreatedEvent'); +exports.ApplicationHealthReportExpiredEvent = require('./applicationHealthReportExpiredEvent'); +exports.ApplicationUpgradeCompleteEvent = require('./applicationUpgradeCompleteEvent'); +exports.ApplicationUpgradeDomainCompleteEvent = require('./applicationUpgradeDomainCompleteEvent'); +exports.ApplicationUpgradeRollbackCompleteEvent = require('./applicationUpgradeRollbackCompleteEvent'); +exports.ApplicationUpgradeRollbackStartEvent = require('./applicationUpgradeRollbackStartEvent'); +exports.ApplicationUpgradeStartEvent = require('./applicationUpgradeStartEvent'); +exports.DeployedApplicationHealthReportCreatedEvent = require('./deployedApplicationHealthReportCreatedEvent'); +exports.DeployedApplicationHealthReportExpiredEvent = require('./deployedApplicationHealthReportExpiredEvent'); +exports.ProcessDeactivatedEvent = require('./processDeactivatedEvent'); +exports.ContainerDeactivatedEvent = require('./containerDeactivatedEvent'); +exports.NodeAbortedEvent = require('./nodeAbortedEvent'); +exports.NodeAbortingEvent = require('./nodeAbortingEvent'); +exports.NodeAddedEvent = require('./nodeAddedEvent'); +exports.NodeCloseEvent = require('./nodeCloseEvent'); +exports.NodeClosingEvent = require('./nodeClosingEvent'); +exports.NodeDeactivateCompleteEvent = require('./nodeDeactivateCompleteEvent'); +exports.NodeDeactivateStartEvent = require('./nodeDeactivateStartEvent'); +exports.NodeDownEvent = require('./nodeDownEvent'); +exports.NodeHealthReportCreatedEvent = require('./nodeHealthReportCreatedEvent'); +exports.NodeHealthReportExpiredEvent = require('./nodeHealthReportExpiredEvent'); +exports.NodeOpenedSuccessEvent = require('./nodeOpenedSuccessEvent'); +exports.NodeOpenFailedEvent = require('./nodeOpenFailedEvent'); +exports.NodeOpeningEvent = require('./nodeOpeningEvent'); +exports.NodeRemovedEvent = require('./nodeRemovedEvent'); +exports.NodeUpEvent = require('./nodeUpEvent'); +exports.PartitionHealthReportCreatedEvent = require('./partitionHealthReportCreatedEvent'); +exports.PartitionHealthReportExpiredEvent = require('./partitionHealthReportExpiredEvent'); +exports.PartitionReconfigurationCompletedEvent = require('./partitionReconfigurationCompletedEvent'); +exports.PartitionPrimaryMoveAnalysisEvent = require('./partitionPrimaryMoveAnalysisEvent'); +exports.ServiceCreatedEvent = require('./serviceCreatedEvent'); +exports.ServiceDeletedEvent = require('./serviceDeletedEvent'); +exports.ServiceHealthReportCreatedEvent = require('./serviceHealthReportCreatedEvent'); +exports.ServiceHealthReportExpiredEvent = require('./serviceHealthReportExpiredEvent'); +exports.DeployedServiceHealthReportCreatedEvent = require('./deployedServiceHealthReportCreatedEvent'); +exports.DeployedServiceHealthReportExpiredEvent = require('./deployedServiceHealthReportExpiredEvent'); +exports.StatefulReplicaHealthReportCreatedEvent = require('./statefulReplicaHealthReportCreatedEvent'); +exports.StatefulReplicaHealthReportExpiredEvent = require('./statefulReplicaHealthReportExpiredEvent'); +exports.StatelessReplicaHealthReportCreatedEvent = require('./statelessReplicaHealthReportCreatedEvent'); +exports.StatelessReplicaHealthReportExpiredEvent = require('./statelessReplicaHealthReportExpiredEvent'); +exports.ClusterHealthReportCreatedEvent = require('./clusterHealthReportCreatedEvent'); +exports.ClusterHealthReportExpiredEvent = require('./clusterHealthReportExpiredEvent'); +exports.ClusterUpgradeCompleteEvent = require('./clusterUpgradeCompleteEvent'); +exports.ClusterUpgradeDomainCompleteEvent = require('./clusterUpgradeDomainCompleteEvent'); +exports.ClusterUpgradeRollbackCompleteEvent = require('./clusterUpgradeRollbackCompleteEvent'); +exports.ClusterUpgradeRollbackStartEvent = require('./clusterUpgradeRollbackStartEvent'); +exports.ClusterUpgradeStartEvent = require('./clusterUpgradeStartEvent'); +exports.ChaosStoppedEvent = require('./chaosStoppedEvent'); +exports.ChaosStartedEvent = require('./chaosStartedEvent'); +exports.ChaosRestartNodeFaultCompletedEvent = require('./chaosRestartNodeFaultCompletedEvent'); +exports.ChaosRestartCodePackageFaultScheduledEvent = require('./chaosRestartCodePackageFaultScheduledEvent'); +exports.ChaosRestartCodePackageFaultCompletedEvent = require('./chaosRestartCodePackageFaultCompletedEvent'); +exports.ChaosRemoveReplicaFaultScheduledEvent = require('./chaosRemoveReplicaFaultScheduledEvent'); +exports.ChaosRemoveReplicaFaultCompletedEvent = require('./chaosRemoveReplicaFaultCompletedEvent'); +exports.ChaosMoveSecondaryFaultScheduledEvent = require('./chaosMoveSecondaryFaultScheduledEvent'); +exports.ChaosMovePrimaryFaultScheduledEvent = require('./chaosMovePrimaryFaultScheduledEvent'); +exports.ChaosRestartReplicaFaultScheduledEvent = require('./chaosRestartReplicaFaultScheduledEvent'); +exports.ChaosRestartNodeFaultScheduledEvent = require('./chaosRestartNodeFaultScheduledEvent'); exports.discriminators = { + 'FabricEvent.ApplicationEvent' : exports.ApplicationEvent, 'HealthEvaluation' : exports.HealthEvaluation, 'HealthEvaluation.Application' : exports.ApplicationHealthEvaluation, 'HealthEvaluation.Applications' : exports.ApplicationsHealthEvaluation, 'HealthEvaluation.ApplicationTypeApplications' : exports.ApplicationTypeApplicationsHealthEvaluation, 'SafetyCheck' : exports.SafetyCheck, + 'FabricEvent.ClusterEvent' : exports.ClusterEvent, + 'FabricEvent.ContainerInstanceEvent' : exports.ContainerInstanceEvent, 'HealthEvaluation.DeltaNodesCheck' : exports.DeltaNodesCheckHealthEvaluation, 'HealthEvaluation.DeployedApplication' : exports.DeployedApplicationHealthEvaluation, 'HealthEvaluation.DeployedApplications' : exports.DeployedApplicationsHealthEvaluation, @@ -293,31 +444,40 @@ exports.discriminators = { 'DeployedServiceReplicaInfo.Stateful' : exports.DeployedStatefulServiceReplicaInfo, 'DeployedServiceReplicaInfo.Stateless' : exports.DeployedStatelessServiceInstanceInfo, 'HealthEvaluation.Event' : exports.EventHealthEvaluation, + 'FabricEvent' : exports.FabricEvent, 'PartitionInformation.Int64Range' : exports.Int64RangePartitionInformation, 'PartitionInformation.Named' : exports.NamedPartitionInformation, + 'FabricEvent.NodeEvent' : exports.NodeEvent, 'HealthEvaluation.Node' : exports.NodeHealthEvaluation, 'HealthEvaluation.Nodes' : exports.NodesHealthEvaluation, 'PartitionInformation' : exports.PartitionInformation, 'ServicePartitionInfo' : exports.ServicePartitionInfo, 'ReplicaInfo' : exports.ReplicaInfo, 'ServiceInfo' : exports.ServiceInfo, + 'FabricEvent.PartitionAnalysisEvent' : exports.PartitionAnalysisEvent, + 'FabricEvent.PartitionEvent' : exports.PartitionEvent, 'EntityHealthState.ReplicaHealthState' : exports.ReplicaHealthState, 'HealthEvaluation.Partition' : exports.PartitionHealthEvaluation, + 'ProvisionApplicationTypeDescriptionBase' : exports.ProvisionApplicationTypeDescriptionBase, + 'ProvisionApplicationTypeDescriptionBase.ImageStorePath' : exports.ProvisionApplicationTypeDescription, + 'ProvisionApplicationTypeDescriptionBase.ExternalStore' : exports.ExternalStoreProvisionApplicationTypeDescription, 'SafetyCheck.PartitionSafetyCheck' : exports.PartitionSafetyCheck, 'SafetyCheck.EnsureAvailability' : exports.EnsureAvailabilitySafetyCheck, 'SafetyCheck.EnsurePartitionQuorum' : exports.EnsurePartitionQurumSafetyCheck, 'SafetyCheck.EnsureSeedNodeQuorum' : exports.SeedNodeSafetyCheck, 'HealthEvaluation.Partitions' : exports.PartitionsHealthEvaluation, + 'FabricEvent.ReplicaEvent' : exports.ReplicaEvent, 'EntityHealth.ReplicaHealth' : exports.ReplicaHealth, 'HealthEvaluation.Replica' : exports.ReplicaHealthEvaluation, 'HealthEvaluation.Replicas' : exports.ReplicasHealthEvaluation, + 'FabricEvent.ServiceEvent' : exports.ServiceEvent, 'HealthEvaluation.Service' : exports.ServiceHealthEvaluation, 'ServicePlacementPolicyDescription.InvalidDomain' : exports.ServicePlacementInvalidDomainPolicyDescription, 'ServicePlacementPolicyDescription.NonPartiallyPlaceService' : exports.ServicePlacementNonPartiallyPlaceServicePolicyDescription, 'ServicePlacementPolicyDescription' : exports.ServicePlacementPolicyDescription, - 'ServicePlacementPolicyDescription.PreferPrimaryDomain' : exports.ServicePlacementPreferPrimaryDomainPolicyDescription, - 'ServicePlacementPolicyDescription.RequireDomain' : exports.ServicePlacementRequiredDomainPolicyDescription, - 'ServicePlacementPolicyDescription.RequireDomainDistribution' : exports.ServicePlacementRequireDomainDistributionPolicyDescription, + 'ServicePlacementPolicyDescription.PreferredPrimaryDomain' : exports.ServicePlacementPreferPrimaryDomainPolicyDescription, + 'ServicePlacementPolicyDescription.RequiredDomain' : exports.ServicePlacementRequiredDomainPolicyDescription, + 'ServicePlacementPolicyDescription.RequiredDomainDistribution' : exports.ServicePlacementRequireDomainDistributionPolicyDescription, 'HealthEvaluation.Services' : exports.ServicesHealthEvaluation, 'ServiceTypeDescription' : exports.ServiceTypeDescription, 'PartitionInformation.Singleton' : exports.SingletonPartitionInformation, @@ -351,6 +511,8 @@ exports.discriminators = { 'PartitionSchemeDescription.Named' : exports.NamedPartitionSchemeDescription, 'PartitionSchemeDescription.Singleton' : exports.SingletonPartitionSchemeDescription, 'PartitionSchemeDescription.UniformInt64Range' : exports.UniformInt64RangePartitionSchemeDescription, + 'ScalingTriggerDescription' : exports.ScalingTriggerDescription, + 'ScalingMechanismDescription' : exports.ScalingMechanismDescription, 'ServiceDescription' : exports.ServiceDescription, 'ServiceDescription.Stateful' : exports.StatefulServiceDescription, 'ServiceDescription.Stateless' : exports.StatelessServiceDescription, @@ -367,8 +529,102 @@ exports.discriminators = { 'ServiceUpdateDescription' : exports.ServiceUpdateDescription, 'ServiceUpdateDescription.Stateful' : exports.StatefulServiceUpdateDescription, 'ServiceUpdateDescription.Stateless' : exports.StatelessServiceUpdateDescription, + 'PropertyValue' : exports.PropertyValue, + 'PropertyValue.Binary' : exports.BinaryPropertyValue, + 'PropertyValue.Int64' : exports.Int64PropertyValue, + 'PropertyValue.Double' : exports.DoublePropertyValue, + 'PropertyValue.String' : exports.StringPropertyValue, + 'PropertyValue.Guid' : exports.GuidPropertyValue, + 'PropertyBatchOperation' : exports.PropertyBatchOperation, + 'PropertyBatchOperation.CheckExists' : exports.CheckExistsPropertyBatchOperation, + 'PropertyBatchOperation.CheckSequence' : exports.CheckSequencePropertyBatchOperation, + 'PropertyBatchOperation.CheckValue' : exports.CheckValuePropertyBatchOperation, + 'PropertyBatchOperation.Delete' : exports.DeletePropertyBatchOperation, + 'PropertyBatchOperation.Get' : exports.GetPropertyBatchOperation, + 'PropertyBatchOperation.Put' : exports.PutPropertyBatchOperation, + 'PropertyBatchInfo' : exports.PropertyBatchInfo, + 'PropertyBatchInfo.Successful' : exports.SuccessfulPropertyBatchInfo, + 'PropertyBatchInfo.Failed' : exports.FailedPropertyBatchInfo, + 'BackupScheduleDescription' : exports.BackupScheduleDescription, + 'BackupStorageDescription' : exports.BackupStorageDescription, + 'BackupConfigurationInfo.Application' : exports.ApplicationBackupConfigurationInfo, + 'BackupConfigurationInfo.Service' : exports.ServiceBackupConfigurationInfo, + 'BackupConfigurationInfo' : exports.BackupConfigurationInfo, + 'BackupStorageDescription.AzureBlobStore' : exports.AzureBlobBackupStorageDescription, + 'BackupStorageDescription.FileShare' : exports.FileShareBackupStorageDescription, + 'BackupScheduleDescription.FrequencyBased' : exports.FrequencyBasedBackupScheduleDescription, + 'BackupScheduleDescription.TimeBased' : exports.TimeBasedBackupScheduleDescription, + 'BackupConfigurationInfo.Partition' : exports.PartitionBackupConfigurationInfo, + 'BackupEntity' : exports.BackupEntity, + 'BackupEntity.Application' : exports.ApplicationBackupEntity, + 'BackupEntity.Service' : exports.ServiceBackupEntity, + 'BackupEntity.Partition' : exports.PartitionBackupEntity, 'RepairImpactDescriptionBase.Node' : exports.NodeRepairImpactDescription, 'RepairTargetDescriptionBase.Node' : exports.NodeRepairTargetDescription, 'RepairImpactDescriptionBase' : exports.RepairImpactDescriptionBase, - 'RepairTargetDescriptionBase' : exports.RepairTargetDescriptionBase + 'RepairTargetDescriptionBase' : exports.RepairTargetDescriptionBase, + 'ScalingTriggerDescription.AveragePartitionLoad' : exports.AveragePartitionLoadScalingTrigger, + 'ScalingTriggerDescription.AverageServiceLoad' : exports.AverageServiceLoadScalingTrigger, + 'ScalingMechanismDescription.PartitionInstanceCount' : exports.PartitionInstanceCountScaleMechanism, + 'ScalingMechanismDescription.AddRemoveIncrementalNamedPartition' : exports.AddRemoveIncrementalNamedPartitionScalingMechanism, + 'FabricEvent.ApplicationCreated' : exports.ApplicationCreatedEvent, + 'FabricEvent.ApplicationDeleted' : exports.ApplicationDeletedEvent, + 'FabricEvent.ApplicationHealthReportCreated' : exports.ApplicationHealthReportCreatedEvent, + 'FabricEvent.ApplicationHealthReportExpired' : exports.ApplicationHealthReportExpiredEvent, + 'FabricEvent.ApplicationUpgradeComplete' : exports.ApplicationUpgradeCompleteEvent, + 'FabricEvent.ApplicationUpgradeDomainComplete' : exports.ApplicationUpgradeDomainCompleteEvent, + 'FabricEvent.ApplicationUpgradeRollbackComplete' : exports.ApplicationUpgradeRollbackCompleteEvent, + 'FabricEvent.ApplicationUpgradeRollbackStart' : exports.ApplicationUpgradeRollbackStartEvent, + 'FabricEvent.ApplicationUpgradeStart' : exports.ApplicationUpgradeStartEvent, + 'FabricEvent.DeployedApplicationHealthReportCreated' : exports.DeployedApplicationHealthReportCreatedEvent, + 'FabricEvent.DeployedApplicationHealthReportExpired' : exports.DeployedApplicationHealthReportExpiredEvent, + 'FabricEvent.ProcessDeactivated' : exports.ProcessDeactivatedEvent, + 'FabricEvent.ContainerDeactivated' : exports.ContainerDeactivatedEvent, + 'FabricEvent.NodeAborted' : exports.NodeAbortedEvent, + 'FabricEvent.NodeAborting' : exports.NodeAbortingEvent, + 'FabricEvent.NodeAdded' : exports.NodeAddedEvent, + 'FabricEvent.NodeClose' : exports.NodeCloseEvent, + 'FabricEvent.NodeClosing' : exports.NodeClosingEvent, + 'FabricEvent.NodeDeactivateComplete' : exports.NodeDeactivateCompleteEvent, + 'FabricEvent.NodeDeactivateStart' : exports.NodeDeactivateStartEvent, + 'FabricEvent.NodeDown' : exports.NodeDownEvent, + 'FabricEvent.NodeHealthReportCreated' : exports.NodeHealthReportCreatedEvent, + 'FabricEvent.NodeHealthReportExpired' : exports.NodeHealthReportExpiredEvent, + 'FabricEvent.NodeOpenedSuccess' : exports.NodeOpenedSuccessEvent, + 'FabricEvent.NodeOpenFailed' : exports.NodeOpenFailedEvent, + 'FabricEvent.NodeOpening' : exports.NodeOpeningEvent, + 'FabricEvent.NodeRemoved' : exports.NodeRemovedEvent, + 'FabricEvent.NodeUp' : exports.NodeUpEvent, + 'FabricEvent.PartitionHealthReportCreated' : exports.PartitionHealthReportCreatedEvent, + 'FabricEvent.PartitionHealthReportExpired' : exports.PartitionHealthReportExpiredEvent, + 'FabricEvent.PartitionReconfigurationCompleted' : exports.PartitionReconfigurationCompletedEvent, + 'FabricEvent.PartitionPrimaryMoveAnalysis' : exports.PartitionPrimaryMoveAnalysisEvent, + 'FabricEvent.ServiceCreated' : exports.ServiceCreatedEvent, + 'FabricEvent.ServiceDeleted' : exports.ServiceDeletedEvent, + 'FabricEvent.ServiceHealthReportCreated' : exports.ServiceHealthReportCreatedEvent, + 'FabricEvent.ServiceHealthReportExpired' : exports.ServiceHealthReportExpiredEvent, + 'FabricEvent.DeployedServiceHealthReportCreated' : exports.DeployedServiceHealthReportCreatedEvent, + 'FabricEvent.DeployedServiceHealthReportExpired' : exports.DeployedServiceHealthReportExpiredEvent, + 'FabricEvent.StatefulReplicaHealthReportCreated' : exports.StatefulReplicaHealthReportCreatedEvent, + 'FabricEvent.StatefulReplicaHealthReportExpired' : exports.StatefulReplicaHealthReportExpiredEvent, + 'FabricEvent.StatelessReplicaHealthReportCreated' : exports.StatelessReplicaHealthReportCreatedEvent, + 'FabricEvent.StatelessReplicaHealthReportExpired' : exports.StatelessReplicaHealthReportExpiredEvent, + 'FabricEvent.ClusterHealthReportCreated' : exports.ClusterHealthReportCreatedEvent, + 'FabricEvent.ClusterHealthReportExpired' : exports.ClusterHealthReportExpiredEvent, + 'FabricEvent.ClusterUpgradeComplete' : exports.ClusterUpgradeCompleteEvent, + 'FabricEvent.ClusterUpgradeDomainComplete' : exports.ClusterUpgradeDomainCompleteEvent, + 'FabricEvent.ClusterUpgradeRollbackComplete' : exports.ClusterUpgradeRollbackCompleteEvent, + 'FabricEvent.ClusterUpgradeRollbackStart' : exports.ClusterUpgradeRollbackStartEvent, + 'FabricEvent.ClusterUpgradeStart' : exports.ClusterUpgradeStartEvent, + 'FabricEvent.ChaosStopped' : exports.ChaosStoppedEvent, + 'FabricEvent.ChaosStarted' : exports.ChaosStartedEvent, + 'FabricEvent.ChaosRestartNodeFaultCompleted' : exports.ChaosRestartNodeFaultCompletedEvent, + 'FabricEvent.ChaosRestartCodePackageFaultScheduled' : exports.ChaosRestartCodePackageFaultScheduledEvent, + 'FabricEvent.ChaosRestartCodePackageFaultCompleted' : exports.ChaosRestartCodePackageFaultCompletedEvent, + 'FabricEvent.ChaosRemoveReplicaFaultScheduled' : exports.ChaosRemoveReplicaFaultScheduledEvent, + 'FabricEvent.ChaosRemoveReplicaFaultCompleted' : exports.ChaosRemoveReplicaFaultCompletedEvent, + 'FabricEvent.ChaosMoveSecondaryFaultScheduled' : exports.ChaosMoveSecondaryFaultScheduledEvent, + 'FabricEvent.ChaosMovePrimaryFaultScheduled' : exports.ChaosMovePrimaryFaultScheduledEvent, + 'FabricEvent.ChaosRestartReplicaFaultScheduled' : exports.ChaosRestartReplicaFaultScheduledEvent, + 'FabricEvent.ChaosRestartNodeFaultScheduled' : exports.ChaosRestartNodeFaultScheduledEvent }; diff --git a/lib/services/serviceFabric/lib/models/int64PropertyValue.js b/lib/services/serviceFabric/lib/models/int64PropertyValue.js new file mode 100644 index 0000000000..fde38a97a7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/int64PropertyValue.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a Service Fabric property value of type Int64. + * + * @extends models['PropertyValue'] + */ +class Int64PropertyValue extends models['PropertyValue'] { + /** + * Create a Int64PropertyValue. + * @member {string} data The data of the property value. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Int64PropertyValue + * + * @returns {object} metadata of Int64PropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'Int64', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'Int64PropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + data: { + required: true, + serializedName: 'Data', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Int64PropertyValue; diff --git a/lib/services/serviceFabric/lib/models/int64RangePartitionInformation.js b/lib/services/serviceFabric/lib/models/int64RangePartitionInformation.js index 5d8486028e..4041db0ed9 100644 --- a/lib/services/serviceFabric/lib/models/int64RangePartitionInformation.js +++ b/lib/services/serviceFabric/lib/models/int64RangePartitionInformation.js @@ -42,6 +42,11 @@ class Int64RangePartitionInformation extends models['PartitionInformation'] { serializedName: 'Int64Range', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServicePartitionKind', + clientName: 'servicePartitionKind' + }, + uberParent: 'PartitionInformation', className: 'Int64RangePartitionInformation', modelProperties: { id: { @@ -54,6 +59,7 @@ class Int64RangePartitionInformation extends models['PartitionInformation'] { servicePartitionKind: { required: true, serializedName: 'ServicePartitionKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/invokeDataLossResult.js b/lib/services/serviceFabric/lib/models/invokeDataLossResult.js index 70afa17050..89276b0ae4 100644 --- a/lib/services/serviceFabric/lib/models/invokeDataLossResult.js +++ b/lib/services/serviceFabric/lib/models/invokeDataLossResult.js @@ -22,9 +22,15 @@ class InvokeDataLossResult { * Create a InvokeDataLossResult. * @member {number} [errorCode] If OperationState is Completed, this is 0. * If OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service + * the partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique + * and does not change for the lifetime of the service. If the same service + * was deleted and recreated the IDs of its partitions would be different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/invokeQuorumLossResult.js b/lib/services/serviceFabric/lib/models/invokeQuorumLossResult.js index 2f9d12f63d..78f3ed58fd 100644 --- a/lib/services/serviceFabric/lib/models/invokeQuorumLossResult.js +++ b/lib/services/serviceFabric/lib/models/invokeQuorumLossResult.js @@ -22,9 +22,15 @@ class InvokeQuorumLossResult { * Create a InvokeQuorumLossResult. * @member {number} [errorCode] If OperationState is Completed, this is 0. * If OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service + * the partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique + * and does not change for the lifetime of the service. If the same service + * was deleted and recreated the IDs of its partitions would be different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/keyValueStoreReplicaStatus.js b/lib/services/serviceFabric/lib/models/keyValueStoreReplicaStatus.js index fd026d5388..5146b52893 100644 --- a/lib/services/serviceFabric/lib/models/keyValueStoreReplicaStatus.js +++ b/lib/services/serviceFabric/lib/models/keyValueStoreReplicaStatus.js @@ -49,11 +49,17 @@ class KeyValueStoreReplicaStatus extends models['ReplicaStatusBase'] { serializedName: 'KeyValueStore', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicaStatusBase', className: 'KeyValueStoreReplicaStatus', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js b/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js index 06ccb16f64..52557313e2 100644 --- a/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js @@ -17,13 +17,39 @@ class MonitoringPolicyDescription { /** * Create a MonitoringPolicyDescription. - * @member {string} [failureAction] Possible values include: 'Invalid', - * 'Rollback', 'Manual' - * @member {string} [healthCheckWaitDurationInMilliseconds] - * @member {string} [healthCheckStableDurationInMilliseconds] - * @member {string} [healthCheckRetryTimeoutInMilliseconds] - * @member {string} [upgradeTimeoutInMilliseconds] - * @member {string} [upgradeDomainTimeoutInMilliseconds] + * @member {string} [failureAction] 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' + * @member {string} [healthCheckWaitDurationInMilliseconds] 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. + * @member {string} [healthCheckStableDurationInMilliseconds] 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. + * @member {string} [healthCheckRetryTimeoutInMilliseconds] 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. + * @member {string} [upgradeTimeoutInMilliseconds] 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. + * @member {string} [upgradeDomainTimeoutInMilliseconds] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nameDescription.js b/lib/services/serviceFabric/lib/models/nameDescription.js new file mode 100644 index 0000000000..17dccad407 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nameDescription.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes a Service Fabric name. + * + */ +class NameDescription { + /** + * Create a NameDescription. + * @member {string} name The Service Fabric name, including the 'fabric:' URI + * scheme. + */ + constructor() { + } + + /** + * Defines the metadata of NameDescription + * + * @returns {object} metadata of NameDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'NameDescription', + type: { + name: 'Composite', + className: 'NameDescription', + modelProperties: { + name: { + required: true, + serializedName: 'Name', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NameDescription; diff --git a/lib/services/serviceFabric/lib/models/namedPartitionInformation.js b/lib/services/serviceFabric/lib/models/namedPartitionInformation.js index a5a4973455..35033bc3d3 100644 --- a/lib/services/serviceFabric/lib/models/namedPartitionInformation.js +++ b/lib/services/serviceFabric/lib/models/namedPartitionInformation.js @@ -39,6 +39,11 @@ class NamedPartitionInformation extends models['PartitionInformation'] { serializedName: 'Named', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServicePartitionKind', + clientName: 'servicePartitionKind' + }, + uberParent: 'PartitionInformation', className: 'NamedPartitionInformation', modelProperties: { id: { @@ -51,6 +56,7 @@ class NamedPartitionInformation extends models['PartitionInformation'] { servicePartitionKind: { required: true, serializedName: 'ServicePartitionKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/namedPartitionSchemeDescription.js b/lib/services/serviceFabric/lib/models/namedPartitionSchemeDescription.js index 4ae3accf80..d6966a7a3a 100644 --- a/lib/services/serviceFabric/lib/models/namedPartitionSchemeDescription.js +++ b/lib/services/serviceFabric/lib/models/namedPartitionSchemeDescription.js @@ -40,11 +40,17 @@ class NamedPartitionSchemeDescription extends models['PartitionSchemeDescription serializedName: 'Named', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'PartitionScheme', + clientName: 'partitionScheme' + }, + uberParent: 'PartitionSchemeDescription', className: 'NamedPartitionSchemeDescription', modelProperties: { partitionScheme: { required: true, serializedName: 'PartitionScheme', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js b/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js new file mode 100644 index 0000000000..e5a665f204 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeAbortedEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Aborted event. + * + * @extends models['NodeEvent'] + */ +class NodeAbortedEvent extends models['NodeEvent'] { + /** + * Create a NodeAbortedEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeAbortedEvent + * + * @returns {object} metadata of NodeAbortedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeAborted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeAbortedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeAbortedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeAbortingEvent.js b/lib/services/serviceFabric/lib/models/nodeAbortingEvent.js new file mode 100644 index 0000000000..ceaa546c95 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeAbortingEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Aborting event. + * + * @extends models['NodeEvent'] + */ +class NodeAbortingEvent extends models['NodeEvent'] { + /** + * Create a NodeAbortingEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeAbortingEvent + * + * @returns {object} metadata of NodeAbortingEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeAborting', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeAbortingEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeAbortingEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeAddedEvent.js b/lib/services/serviceFabric/lib/models/nodeAddedEvent.js new file mode 100644 index 0000000000..dbdf221891 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeAddedEvent.js @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Added event. + * + * @extends models['NodeEvent'] + */ +class NodeAddedEvent extends models['NodeEvent'] { + /** + * Create a NodeAddedEvent. + * @member {string} nodeId Id of Node. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeType Type of Node. + * @member {string} fabricVersion Fabric version. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} nodeCapacities Capacities. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeAddedEvent + * + * @returns {object} metadata of NodeAddedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeAdded', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeAddedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeType: { + required: true, + serializedName: 'NodeType', + type: { + name: 'String' + } + }, + fabricVersion: { + required: true, + serializedName: 'FabricVersion', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + nodeCapacities: { + required: true, + serializedName: 'NodeCapacities', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeAddedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeCloseEvent.js b/lib/services/serviceFabric/lib/models/nodeCloseEvent.js new file mode 100644 index 0000000000..ccf940a9cb --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeCloseEvent.js @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Close event. + * + * @extends models['NodeEvent'] + */ +class NodeCloseEvent extends models['NodeEvent'] { + /** + * Create a NodeCloseEvent. + * @member {string} nodeId Id of Node. + * @member {string} nodeInstance Id of Node instance. + * @member {string} error Describes error. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeCloseEvent + * + * @returns {object} metadata of NodeCloseEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeClose', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeCloseEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'String' + } + }, + error: { + required: true, + serializedName: 'Error', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeCloseEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeClosingEvent.js b/lib/services/serviceFabric/lib/models/nodeClosingEvent.js new file mode 100644 index 0000000000..36cb8254ea --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeClosingEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Closing event. + * + * @extends models['NodeEvent'] + */ +class NodeClosingEvent extends models['NodeEvent'] { + /** + * Create a NodeClosingEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeClosingEvent + * + * @returns {object} metadata of NodeClosingEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeClosing', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeClosingEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeClosingEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivateCompleteEvent.js b/lib/services/serviceFabric/lib/models/nodeDeactivateCompleteEvent.js new file mode 100644 index 0000000000..5d2584e37f --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeDeactivateCompleteEvent.js @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Deactivate Complete event. + * + * @extends models['NodeEvent'] + */ +class NodeDeactivateCompleteEvent extends models['NodeEvent'] { + /** + * Create a NodeDeactivateCompleteEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} effectiveDeactivateIntent Describes deactivate intent. + * @member {string} batchIdsWithDeactivateIntent Batch Ids. + * @member {date} startTime Start time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeDeactivateCompleteEvent + * + * @returns {object} metadata of NodeDeactivateCompleteEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeDeactivateComplete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeDeactivateCompleteEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + effectiveDeactivateIntent: { + required: true, + serializedName: 'EffectiveDeactivateIntent', + type: { + name: 'String' + } + }, + batchIdsWithDeactivateIntent: { + required: true, + serializedName: 'BatchIdsWithDeactivateIntent', + type: { + name: 'String' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeDeactivateCompleteEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivateStartEvent.js b/lib/services/serviceFabric/lib/models/nodeDeactivateStartEvent.js new file mode 100644 index 0000000000..1d2e9fa784 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeDeactivateStartEvent.js @@ -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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Deactivate Start event. + * + * @extends models['NodeEvent'] + */ +class NodeDeactivateStartEvent extends models['NodeEvent'] { + /** + * Create a NodeDeactivateStartEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} batchId Batch Id. + * @member {string} deactivateIntent Describes deactivate intent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeDeactivateStartEvent + * + * @returns {object} metadata of NodeDeactivateStartEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeDeactivateStart', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeDeactivateStartEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + batchId: { + required: true, + serializedName: 'BatchId', + type: { + name: 'String' + } + }, + deactivateIntent: { + required: true, + serializedName: 'DeactivateIntent', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeDeactivateStartEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivationInfo.js b/lib/services/serviceFabric/lib/models/nodeDeactivationInfo.js index e5425d7da6..be67582576 100644 --- a/lib/services/serviceFabric/lib/models/nodeDeactivationInfo.js +++ b/lib/services/serviceFabric/lib/models/nodeDeactivationInfo.js @@ -20,12 +20,15 @@ const models = require('./index'); class NodeDeactivationInfo { /** * Create a NodeDeactivationInfo. - * @member {string} [nodeDeactivationIntent] Possible values include: - * 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - * @member {string} [nodeDeactivationStatus] Possible values include: 'None', - * 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' - * @member {array} [nodeDeactivationTask] - * @member {array} [pendingSafetyChecks] + * @member {string} [nodeDeactivationIntent] The intent or the reason for + * deactivating the node. Following are the possible values for it. Possible + * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + * @member {string} [nodeDeactivationStatus] The status of node deactivation + * operation. Following are the possible values. Possible values include: + * 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', 'Completed' + * @member {array} [nodeDeactivationTask] List of tasks representing the + * deactivation operation on the node. + * @member {array} [pendingSafetyChecks] List of pending safety checks */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivationTask.js b/lib/services/serviceFabric/lib/models/nodeDeactivationTask.js index 7c35899b46..3eaec2e593 100644 --- a/lib/services/serviceFabric/lib/models/nodeDeactivationTask.js +++ b/lib/services/serviceFabric/lib/models/nodeDeactivationTask.js @@ -19,12 +19,16 @@ const models = require('./index'); class NodeDeactivationTask { /** * Create a NodeDeactivationTask. - * @member {object} [nodeDeactivationTaskId] + * @member {object} [nodeDeactivationTaskId] Identity of the task related to + * deactivation operation on the node. * @member {string} [nodeDeactivationTaskId.id] Value of the task id. - * @member {string} [nodeDeactivationTaskId.nodeDeactivationTaskType] - * Possible values include: 'Invalid', 'Infrastructure', 'Repair', 'Client' - * @member {string} [nodeDeactivationIntent] Possible values include: - * 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' + * @member {string} [nodeDeactivationTaskId.nodeDeactivationTaskType] The + * type of the task that performed the node deactivation. Following are the + * possible values. Possible values include: 'Invalid', 'Infrastructure', + * 'Repair', 'Client' + * @member {string} [nodeDeactivationIntent] The intent or the reason for + * deactivating the node. Following are the possible values for it. Possible + * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nodeDeactivationTaskId.js b/lib/services/serviceFabric/lib/models/nodeDeactivationTaskId.js index a9636eab92..65b86e908d 100644 --- a/lib/services/serviceFabric/lib/models/nodeDeactivationTaskId.js +++ b/lib/services/serviceFabric/lib/models/nodeDeactivationTaskId.js @@ -18,8 +18,9 @@ class NodeDeactivationTaskId { /** * Create a NodeDeactivationTaskId. * @member {string} [id] Value of the task id. - * @member {string} [nodeDeactivationTaskType] Possible values include: - * 'Invalid', 'Infrastructure', 'Repair', 'Client' + * @member {string} [nodeDeactivationTaskType] The type of the task that + * performed the node deactivation. Following are the possible values. + * Possible values include: 'Invalid', 'Infrastructure', 'Repair', 'Client' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nodeDownEvent.js b/lib/services/serviceFabric/lib/models/nodeDownEvent.js new file mode 100644 index 0000000000..d91bde47f3 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeDownEvent.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Down event. + * + * @extends models['NodeEvent'] + */ +class NodeDownEvent extends models['NodeEvent'] { + /** + * Create a NodeDownEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {date} lastNodeUpAt Time when Node was last up. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeDownEvent + * + * @returns {object} metadata of NodeDownEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeDown', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeDownEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + lastNodeUpAt: { + required: true, + serializedName: 'LastNodeUpAt', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeDownEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeEvent.js b/lib/services/serviceFabric/lib/models/nodeEvent.js new file mode 100644 index 0000000000..9fa73fdbaf --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeEvent.js @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Node Events. + * + * @extends models['FabricEvent'] + */ +class NodeEvent extends models['FabricEvent'] { + /** + * Create a NodeEvent. + * @member {string} nodeName The name of a Service Fabric node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeEvent + * + * @returns {object} metadata of NodeEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeHealth.js b/lib/services/serviceFabric/lib/models/nodeHealth.js index e36887e251..0b9558b8d4 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealth.js +++ b/lib/services/serviceFabric/lib/models/nodeHealth.js @@ -20,7 +20,8 @@ const models = require('./index'); class NodeHealth extends models['EntityHealth'] { /** * Create a NodeHealth. - * @member {string} [name] + * @member {string} [name] Name of the node whose health information is + * described by this object. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/nodeHealthEvaluation.js b/lib/services/serviceFabric/lib/models/nodeHealthEvaluation.js index f26941786d..0a68519d19 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthEvaluation.js @@ -23,8 +23,10 @@ const models = require('./index'); class NodeHealthEvaluation extends models['HealthEvaluation'] { /** * Create a NodeHealthEvaluation. - * @member {string} [nodeName] - * @member {array} [unhealthyEvaluations] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state of the node. The types of the + * unhealthy evaluations can be EventHealthEvaluation. */ constructor() { super(); @@ -42,6 +44,11 @@ class NodeHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Node', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'NodeHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -61,6 +68,7 @@ class NodeHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/nodeHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/nodeHealthReportCreatedEvent.js new file mode 100644 index 0000000000..55aaee6480 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeHealthReportCreatedEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Health Report Created event. + * + * @extends models['NodeEvent'] + */ +class NodeHealthReportCreatedEvent extends models['NodeEvent'] { + /** + * Create a NodeHealthReportCreatedEvent. + * @member {number} nodeInstanceId Id of Node instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeHealthReportCreatedEvent + * + * @returns {object} metadata of NodeHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js new file mode 100644 index 0000000000..5357baab58 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeHealthReportExpiredEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Health Report Expired event. + * + * @extends models['NodeEvent'] + */ +class NodeHealthReportExpiredEvent extends models['NodeEvent'] { + /** + * Create a NodeHealthReportExpiredEvent. + * @member {number} nodeInstanceId Id of Node instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeHealthReportExpiredEvent + * + * @returns {object} metadata of NodeHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeHealthState.js b/lib/services/serviceFabric/lib/models/nodeHealthState.js index 17c66c139d..aa8742852d 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthState.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthState.js @@ -21,8 +21,9 @@ const models = require('./index'); class NodeHealthState extends models['EntityHealthState'] { /** * Create a NodeHealthState. - * @member {string} [name] - * @member {object} [id] + * @member {string} [name] The name of a Service Fabric node. + * @member {object} [id] An internal ID used by Service Fabric to uniquely + * identify a node. Node Id is deterministically generated from node name. * @member {string} [id.id] Value of the node Id. This is a 128 bit integer. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js b/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js index 9c59ce5c9b..bc445f173c 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js @@ -22,7 +22,7 @@ const models = require('./index'); class NodeHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a NodeHealthStateChunk. - * @member {string} [nodeName] + * @member {string} [nodeName] The name of a Service Fabric node. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/nodeInfo.js b/lib/services/serviceFabric/lib/models/nodeInfo.js index 69c1ec4c9e..fc9221fd73 100644 --- a/lib/services/serviceFabric/lib/models/nodeInfo.js +++ b/lib/services/serviceFabric/lib/models/nodeInfo.js @@ -19,7 +19,7 @@ const models = require('./index'); class NodeInfo { /** * Create a NodeInfo. - * @member {string} [name] + * @member {string} [name] The name of a Service Fabric node. * @member {string} [ipAddressOrFQDN] The IP address or fully qualified * domain name of the node. * @member {string} [type] The type of the node. @@ -27,31 +27,41 @@ class NodeInfo { * the node is running. * @member {string} [configVersion] The version of Service Fabric cluster * manifest that the node is using. - * @member {string} [nodeStatus] Possible values include: 'Invalid', 'Up', - * 'Down', 'Enabling', 'Disabling', 'Disabled', 'Unknown', 'Removed' + * @member {string} [nodeStatus] The status of the node. Possible values + * include: 'Invalid', 'Up', 'Down', 'Enabling', 'Disabling', 'Disabled', + * 'Unknown', 'Removed' * @member {string} [nodeUpTimeInSeconds] Time in seconds since the node has - * been in NodeStatus Up. Value ero indicates that the node is not Up. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' + * been in NodeStatus Up. Value zero indicates that the node is not Up. + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {boolean} [isSeedNode] 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. * @member {string} [upgradeDomain] The upgrade domain of the node. * @member {string} [faultDomain] The fault domain of the node. - * @member {object} [id] + * @member {object} [id] An internal ID used by Service Fabric to uniquely + * identify a node. Node Id is deterministically generated from node name. * @member {string} [id.id] Value of the node Id. This is a 128 bit integer. - * @member {string} [instanceId] The id representing the node instance. While - * the Id of the node is deterministically generated from the node name and + * @member {string} [instanceId] 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. - * @member {object} [nodeDeactivationInfo] - * @member {string} [nodeDeactivationInfo.nodeDeactivationIntent] Possible - * values include: 'Invalid', 'Pause', 'Restart', 'RemoveData', 'RemoveNode' - * @member {string} [nodeDeactivationInfo.nodeDeactivationStatus] Possible - * values include: 'None', 'SafetyCheckInProgress', 'SafetyCheckComplete', - * 'Completed' - * @member {array} [nodeDeactivationInfo.nodeDeactivationTask] - * @member {array} [nodeDeactivationInfo.pendingSafetyChecks] + * @member {object} [nodeDeactivationInfo] Information about the node + * deactivation. This information is valid for a node that is undergoing + * deactivation or has already been deactivated. + * @member {string} [nodeDeactivationInfo.nodeDeactivationIntent] The intent + * or the reason for deactivating the node. Following are the possible values + * for it. Possible values include: 'Invalid', 'Pause', 'Restart', + * 'RemoveData', 'RemoveNode' + * @member {string} [nodeDeactivationInfo.nodeDeactivationStatus] The status + * of node deactivation operation. Following are the possible values. + * Possible values include: 'None', 'SafetyCheckInProgress', + * 'SafetyCheckComplete', 'Completed' + * @member {array} [nodeDeactivationInfo.nodeDeactivationTask] List of tasks + * representing the deactivation operation on the node. + * @member {array} [nodeDeactivationInfo.pendingSafetyChecks] List of pending + * safety checks * @member {boolean} [isStopped] Indicates if the node is stopped by calling * stop node API or not. Returns true if the node is stopped, otherwise * false. diff --git a/lib/services/serviceFabric/lib/models/nodeLoadInfo.js b/lib/services/serviceFabric/lib/models/nodeLoadInfo.js index b9aa6fd3de..1651d46168 100644 --- a/lib/services/serviceFabric/lib/models/nodeLoadInfo.js +++ b/lib/services/serviceFabric/lib/models/nodeLoadInfo.js @@ -20,7 +20,8 @@ const models = require('./index'); class NodeLoadInfo { /** * Create a NodeLoadInfo. - * @member {string} [nodeName] + * @member {string} [nodeName] Name of the node for which the load + * information is provided by this object. * @member {array} [nodeLoadMetricInformation] List that contains metrics and * their load information on this node. */ diff --git a/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js b/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js new file mode 100644 index 0000000000..147f21f661 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeOpenFailedEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Open Failed event. + * + * @extends models['NodeEvent'] + */ +class NodeOpenFailedEvent extends models['NodeEvent'] { + /** + * Create a NodeOpenFailedEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + * @member {string} error Describes the error. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeOpenFailedEvent + * + * @returns {object} metadata of NodeOpenFailedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeOpenFailed', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeOpenFailedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + }, + error: { + required: true, + serializedName: 'Error', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeOpenFailedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeOpenedSuccessEvent.js b/lib/services/serviceFabric/lib/models/nodeOpenedSuccessEvent.js new file mode 100644 index 0000000000..85a48da92e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeOpenedSuccessEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Opened Success event. + * + * @extends models['NodeEvent'] + */ +class NodeOpenedSuccessEvent extends models['NodeEvent'] { + /** + * Create a NodeOpenedSuccessEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeOpenedSuccessEvent + * + * @returns {object} metadata of NodeOpenedSuccessEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeOpenedSuccess', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeOpenedSuccessEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeOpenedSuccessEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeOpeningEvent.js b/lib/services/serviceFabric/lib/models/nodeOpeningEvent.js new file mode 100644 index 0000000000..bae045bc15 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeOpeningEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Opening event. + * + * @extends models['NodeEvent'] + */ +class NodeOpeningEvent extends models['NodeEvent'] { + /** + * Create a NodeOpeningEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeId Id of Node. + * @member {string} upgradeDomain Upgrade domain of Node. + * @member {string} faultDomain Fault domain of Node. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} hostname Name of Host. + * @member {boolean} isSeedNode Indicates if it is seed node. + * @member {string} nodeVersion Version of Node. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeOpeningEvent + * + * @returns {object} metadata of NodeOpeningEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeOpening', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeOpeningEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + upgradeDomain: { + required: true, + serializedName: 'UpgradeDomain', + type: { + name: 'String' + } + }, + faultDomain: { + required: true, + serializedName: 'FaultDomain', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + hostname: { + required: true, + serializedName: 'Hostname', + type: { + name: 'String' + } + }, + isSeedNode: { + required: true, + serializedName: 'IsSeedNode', + type: { + name: 'Boolean' + } + }, + nodeVersion: { + required: true, + serializedName: 'NodeVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeOpeningEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeRemovedEvent.js b/lib/services/serviceFabric/lib/models/nodeRemovedEvent.js new file mode 100644 index 0000000000..0e439e38fd --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeRemovedEvent.js @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Removed event. + * + * @extends models['NodeEvent'] + */ +class NodeRemovedEvent extends models['NodeEvent'] { + /** + * Create a NodeRemovedEvent. + * @member {string} nodeId Id of Node. + * @member {number} nodeInstance Id of Node instance. + * @member {string} nodeType Type of Node. + * @member {string} fabricVersion Fabric version. + * @member {string} ipAddressOrFQDN IP address or FQDN. + * @member {string} nodeCapacities Capacities. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeRemovedEvent + * + * @returns {object} metadata of NodeRemovedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeRemoved', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeRemovedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeId: { + required: true, + serializedName: 'NodeId', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + nodeType: { + required: true, + serializedName: 'NodeType', + type: { + name: 'String' + } + }, + fabricVersion: { + required: true, + serializedName: 'FabricVersion', + type: { + name: 'String' + } + }, + ipAddressOrFQDN: { + required: true, + serializedName: 'IpAddressOrFQDN', + type: { + name: 'String' + } + }, + nodeCapacities: { + required: true, + serializedName: 'NodeCapacities', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = NodeRemovedEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js b/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js index bab68ee90c..5edc43f725 100644 --- a/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js +++ b/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js @@ -43,11 +43,17 @@ class NodeRepairImpactDescription extends models['RepairImpactDescriptionBase'] serializedName: 'Node', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'RepairImpactDescriptionBase', className: 'NodeRepairImpactDescription', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js b/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js index 51ea00cf54..e604312fb3 100644 --- a/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js +++ b/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js @@ -42,11 +42,17 @@ class NodeRepairTargetDescription extends models['RepairTargetDescriptionBase'] serializedName: 'Node', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'RepairTargetDescriptionBase', className: 'NodeRepairTargetDescription', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/nodeResult.js b/lib/services/serviceFabric/lib/models/nodeResult.js index af10adea46..63ed2d75c6 100644 --- a/lib/services/serviceFabric/lib/models/nodeResult.js +++ b/lib/services/serviceFabric/lib/models/nodeResult.js @@ -18,7 +18,7 @@ class NodeResult { /** * Create a NodeResult. - * @member {string} [nodeName] + * @member {string} [nodeName] The name of a Service Fabric node. * @member {string} [nodeInstanceId] The node instance id. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js b/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js index 9de744467f..8431f4a88f 100644 --- a/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js +++ b/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js @@ -23,14 +23,18 @@ const models = require('./index'); class NodeTransitionProgress { /** * Create a NodeTransitionProgress. - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [nodeTransitionResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [nodeTransitionResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [nodeTransitionResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [nodeTransitionResult.nodeResult] - * @member {string} [nodeTransitionResult.nodeResult.nodeName] + * @member {object} [nodeTransitionResult.nodeResult] Contains information + * about a node that was targeted by a user-induced operation. + * @member {string} [nodeTransitionResult.nodeResult.nodeName] The name of a + * Service Fabric node. * @member {string} [nodeTransitionResult.nodeResult.nodeInstanceId] The node * instance id. */ diff --git a/lib/services/serviceFabric/lib/models/nodeTransitionResult.js b/lib/services/serviceFabric/lib/models/nodeTransitionResult.js index fde5ee56e9..4c1ce354f1 100644 --- a/lib/services/serviceFabric/lib/models/nodeTransitionResult.js +++ b/lib/services/serviceFabric/lib/models/nodeTransitionResult.js @@ -22,8 +22,9 @@ class NodeTransitionResult { * Create a NodeTransitionResult. * @member {number} [errorCode] If OperationState is Completed, this is 0. * If OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [nodeResult] - * @member {string} [nodeResult.nodeName] + * @member {object} [nodeResult] Contains information about a node that was + * targeted by a user-induced operation. + * @member {string} [nodeResult.nodeName] The name of a Service Fabric node. * @member {string} [nodeResult.nodeInstanceId] The node instance id. */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/nodeUpEvent.js b/lib/services/serviceFabric/lib/models/nodeUpEvent.js new file mode 100644 index 0000000000..cfb4eceb32 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/nodeUpEvent.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Node Up event. + * + * @extends models['NodeEvent'] + */ +class NodeUpEvent extends models['NodeEvent'] { + /** + * Create a NodeUpEvent. + * @member {number} nodeInstance Id of Node instance. + * @member {date} lastNodeDownAt Time when Node was last down. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of NodeUpEvent + * + * @returns {object} metadata of NodeUpEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'NodeUp', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeUpEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstance: { + required: true, + serializedName: 'NodeInstance', + type: { + name: 'Number' + } + }, + lastNodeDownAt: { + required: true, + serializedName: 'LastNodeDownAt', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = NodeUpEvent; diff --git a/lib/services/serviceFabric/lib/models/nodeUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/nodeUpgradeProgressInfo.js index 504fce8acf..4ca2997219 100644 --- a/lib/services/serviceFabric/lib/models/nodeUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/nodeUpgradeProgressInfo.js @@ -19,10 +19,11 @@ const models = require('./index'); class NodeUpgradeProgressInfo { /** * Create a NodeUpgradeProgressInfo. - * @member {string} [nodeName] - * @member {string} [upgradePhase] Possible values include: 'Invalid', - * 'PreUpgradeSafetyCheck', 'Upgrading', 'PostUpgradeSafetyCheck' - * @member {array} [pendingSafetyChecks] + * @member {string} [nodeName] The name of a Service Fabric node. + * @member {string} [upgradePhase] The state of the upgrading node. Possible + * values include: 'Invalid', 'PreUpgradeSafetyCheck', 'Upgrading', + * 'PostUpgradeSafetyCheck' + * @member {array} [pendingSafetyChecks] List of pending safety checks */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nodesHealthEvaluation.js b/lib/services/serviceFabric/lib/models/nodesHealthEvaluation.js index e65df6d54c..04f94beeef 100644 --- a/lib/services/serviceFabric/lib/models/nodesHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/nodesHealthEvaluation.js @@ -27,7 +27,9 @@ class NodesHealthEvaluation extends models['HealthEvaluation'] { * unhealthy nodes from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of nodes found in the health * store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -45,6 +47,11 @@ class NodesHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Nodes', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'NodesHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -64,6 +71,7 @@ class NodesHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/operationStatus.js b/lib/services/serviceFabric/lib/models/operationStatus.js index 72c672e372..ac17b741a5 100644 --- a/lib/services/serviceFabric/lib/models/operationStatus.js +++ b/lib/services/serviceFabric/lib/models/operationStatus.js @@ -18,12 +18,14 @@ class OperationStatus { /** * Create a OperationStatus. - * @member {uuid} [operationId] - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {string} [type] Possible values include: 'Invalid', - * 'PartitionDataLoss', 'PartitionQuorumLoss', 'PartitionRestart', - * 'NodeTransition' + * @member {uuid} [operationId] A GUID that identifies a call to this API. + * This is also passed into the corresponding GetProgress API. + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {string} [type] The type of the operation. Possible values + * include: 'Invalid', 'PartitionDataLoss', 'PartitionQuorumLoss', + * 'PartitionRestart', 'NodeTransition' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/packageSharingPolicyInfo.js b/lib/services/serviceFabric/lib/models/packageSharingPolicyInfo.js index e82901fa9d..9619bf4957 100644 --- a/lib/services/serviceFabric/lib/models/packageSharingPolicyInfo.js +++ b/lib/services/serviceFabric/lib/models/packageSharingPolicyInfo.js @@ -19,8 +19,10 @@ class PackageSharingPolicyInfo { * Create a PackageSharingPolicyInfo. * @member {string} [sharedPackageName] The name of code, configuration or * data package that should be shared. - * @member {string} [packageSharingScope] Possible values include: 'None', - * 'All', 'Code', 'Config', 'Data' + * @member {string} [packageSharingScope] Represents the scope for + * PackageSharingPolicy. This is specified during DeployServicePackageToNode + * operation. Possible values include: 'None', 'All', 'Code', 'Config', + * 'Data' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedApplicationInfoList.js b/lib/services/serviceFabric/lib/models/pagedApplicationInfoList.js index 14f990a6c1..edeb7e37e2 100644 --- a/lib/services/serviceFabric/lib/models/pagedApplicationInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedApplicationInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedApplicationInfoList { /** * Create a PagedApplicationInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of application information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedApplicationTypeInfoList.js b/lib/services/serviceFabric/lib/models/pagedApplicationTypeInfoList.js index a6638cb93f..ed2277e287 100644 --- a/lib/services/serviceFabric/lib/models/pagedApplicationTypeInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedApplicationTypeInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedApplicationTypeInfoList { /** * Create a PagedApplicationTypeInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of application type information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedBackupConfigurationInfoList.js b/lib/services/serviceFabric/lib/models/pagedBackupConfigurationInfoList.js new file mode 100644 index 0000000000..8b735900a7 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedBackupConfigurationInfoList.js @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class PagedBackupConfigurationInfoList { + /** + * Create a PagedBackupConfigurationInfoList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup configuration information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedBackupConfigurationInfoList + * + * @returns {object} metadata of PagedBackupConfigurationInfoList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedBackupConfigurationInfoList', + type: { + name: 'Composite', + className: 'PagedBackupConfigurationInfoList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupConfigurationInfoElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'BackupConfigurationInfo', + className: 'BackupConfigurationInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedBackupConfigurationInfoList; diff --git a/lib/services/serviceFabric/lib/models/pagedBackupEntityList.js b/lib/services/serviceFabric/lib/models/pagedBackupEntityList.js new file mode 100644 index 0000000000..af5eec8e58 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedBackupEntityList.js @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class PagedBackupEntityList { + /** + * Create a PagedBackupEntityList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup entity information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedBackupEntityList + * + * @returns {object} metadata of PagedBackupEntityList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedBackupEntityList', + type: { + name: 'Composite', + className: 'PagedBackupEntityList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupEntityElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'BackupEntity' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedBackupEntityList; diff --git a/lib/services/serviceFabric/lib/models/pagedBackupInfoList.js b/lib/services/serviceFabric/lib/models/pagedBackupInfoList.js new file mode 100644 index 0000000000..13b4e089b0 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedBackupInfoList.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class PagedBackupInfoList { + /** + * Create a PagedBackupInfoList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of backup information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedBackupInfoList + * + * @returns {object} metadata of PagedBackupInfoList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedBackupInfoList', + type: { + name: 'Composite', + className: 'PagedBackupInfoList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupInfoElementType', + type: { + name: 'Composite', + className: 'BackupInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedBackupInfoList; diff --git a/lib/services/serviceFabric/lib/models/pagedBackupPolicyDescriptionList.js b/lib/services/serviceFabric/lib/models/pagedBackupPolicyDescriptionList.js new file mode 100644 index 0000000000..b90bcc4474 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedBackupPolicyDescriptionList.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class PagedBackupPolicyDescriptionList { + /** + * Create a PagedBackupPolicyDescriptionList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] The list of backup policies information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedBackupPolicyDescriptionList + * + * @returns {object} metadata of PagedBackupPolicyDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedBackupPolicyDescriptionList', + type: { + name: 'Composite', + className: 'PagedBackupPolicyDescriptionList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'BackupPolicyDescription' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedBackupPolicyDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/pagedComposeDeploymentStatusInfoList.js b/lib/services/serviceFabric/lib/models/pagedComposeDeploymentStatusInfoList.js index 40c027f74e..b2d126b792 100644 --- a/lib/services/serviceFabric/lib/models/pagedComposeDeploymentStatusInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedComposeDeploymentStatusInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedComposeDeploymentStatusInfoList { /** * Create a PagedComposeDeploymentStatusInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of compose deployment status information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js b/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js new file mode 100644 index 0000000000..7cfc47b20b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + */ +class PagedDeployedApplicationInfoList { + /** + * Create a PagedDeployedApplicationInfoList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of deployed application information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedDeployedApplicationInfoList + * + * @returns {object} metadata of PagedDeployedApplicationInfoList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedDeployedApplicationInfoList', + type: { + name: 'Composite', + className: 'PagedDeployedApplicationInfoList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + items: { + required: false, + serializedName: 'Items', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DeployedApplicationInfoElementType', + type: { + name: 'Composite', + className: 'DeployedApplicationInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedDeployedApplicationInfoList; diff --git a/lib/services/serviceFabric/lib/models/pagedNodeInfoList.js b/lib/services/serviceFabric/lib/models/pagedNodeInfoList.js index a780a9f126..f3435abcf2 100644 --- a/lib/services/serviceFabric/lib/models/pagedNodeInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedNodeInfoList.js @@ -21,8 +21,13 @@ const models = require('./index'); class PagedNodeInfoList { /** * Create a PagedNodeInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of node information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedPropertyInfoList.js b/lib/services/serviceFabric/lib/models/pagedPropertyInfoList.js new file mode 100644 index 0000000000..cf6ac84dc5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedPropertyInfoList.js @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + */ +class PagedPropertyInfoList { + /** + * Create a PagedPropertyInfoList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {boolean} [isConsistent] Indicates whether any property under the + * given name has been modified during the enumeration. If there was a + * modification, this property value is false. + * @member {array} [properties] List of property information. + */ + constructor() { + } + + /** + * Defines the metadata of PagedPropertyInfoList + * + * @returns {object} metadata of PagedPropertyInfoList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedPropertyInfoList', + type: { + name: 'Composite', + className: 'PagedPropertyInfoList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + isConsistent: { + required: false, + serializedName: 'IsConsistent', + type: { + name: 'Boolean' + } + }, + properties: { + required: false, + serializedName: 'Properties', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PropertyInfoElementType', + type: { + name: 'Composite', + className: 'PropertyInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedPropertyInfoList; diff --git a/lib/services/serviceFabric/lib/models/pagedReplicaInfoList.js b/lib/services/serviceFabric/lib/models/pagedReplicaInfoList.js index 465b865017..c7489d60fe 100644 --- a/lib/services/serviceFabric/lib/models/pagedReplicaInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedReplicaInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedReplicaInfoList { /** * Create a PagedReplicaInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of replica information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedServiceInfoList.js b/lib/services/serviceFabric/lib/models/pagedServiceInfoList.js index dd19b53c6b..b2d9171f0d 100644 --- a/lib/services/serviceFabric/lib/models/pagedServiceInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedServiceInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedServiceInfoList { /** * Create a PagedServiceInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of service information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedServicePartitionInfoList.js b/lib/services/serviceFabric/lib/models/pagedServicePartitionInfoList.js index 5f1949ed31..da02db5ee4 100644 --- a/lib/services/serviceFabric/lib/models/pagedServicePartitionInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedServicePartitionInfoList.js @@ -22,8 +22,13 @@ const models = require('./index'); class PagedServicePartitionInfoList { /** * Create a PagedServicePartitionInfoList. - * @member {string} [continuationToken] - * @member {array} [items] + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {array} [items] List of service partition information. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/pagedSubNameInfoList.js b/lib/services/serviceFabric/lib/models/pagedSubNameInfoList.js new file mode 100644 index 0000000000..95b26112a8 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/pagedSubNameInfoList.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * 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. + * + */ +class PagedSubNameInfoList { + /** + * Create a PagedSubNameInfoList. + * @member {string} [continuationToken] The continuation token parameter is + * used to obtain next set of results. The continuation token is included in + * the response of the API when the results from the system do not fit in a + * single response. When this value is passed to the next API call, the API + * returns next set of results. If there are no further results then the + * continuation token is not included in the response. + * @member {boolean} [isConsistent] Indicates whether any name under the + * given name has been modified during the enumeration. If there was a + * modification, this property value is false. + * @member {array} [subNames] List of the child names. + */ + constructor() { + } + + /** + * Defines the metadata of PagedSubNameInfoList + * + * @returns {object} metadata of PagedSubNameInfoList + * + */ + mapper() { + return { + required: false, + serializedName: 'PagedSubNameInfoList', + type: { + name: 'Composite', + className: 'PagedSubNameInfoList', + modelProperties: { + continuationToken: { + required: false, + serializedName: 'ContinuationToken', + type: { + name: 'String' + } + }, + isConsistent: { + required: false, + serializedName: 'IsConsistent', + type: { + name: 'Boolean' + } + }, + subNames: { + required: false, + serializedName: 'SubNames', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = PagedSubNameInfoList; diff --git a/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js b/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js new file mode 100644 index 0000000000..0df9eff7df --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionAnalysisEvent.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Partition Analysis Events. + * + * @extends models['PartitionEvent'] + */ +class PartitionAnalysisEvent extends models['PartitionEvent'] { + /** + * Create a PartitionAnalysisEvent. + * @member {object} metadata Metadata about an Analysis Event. + * @member {moment.duration} [metadata.delay] The analysis delay. + * @member {moment.duration} [metadata.duration] The duration of analysis. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionAnalysisEvent + * + * @returns {object} metadata of PartitionAnalysisEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionAnalysisEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionAnalysisEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + metadata: { + required: true, + serializedName: 'Metadata', + type: { + name: 'Composite', + className: 'AnalysisEventMetadata' + } + } + } + } + }; + } +} + +module.exports = PartitionAnalysisEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js new file mode 100644 index 0000000000..cbda0dac55 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionBackupConfigurationInfo.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Backup configuration information, for a specific partition, specifying what + * backup policy is being applied and suspend description, if any. + * + * @extends models['BackupConfigurationInfo'] + */ +class PartitionBackupConfigurationInfo extends models['BackupConfigurationInfo'] { + /** + * Create a PartitionBackupConfigurationInfo. + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionBackupConfigurationInfo + * + * @returns {object} metadata of PartitionBackupConfigurationInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Partition', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'BackupConfigurationInfo', + className: 'PartitionBackupConfigurationInfo', + modelProperties: { + policyName: { + required: false, + serializedName: 'PolicyName', + type: { + name: 'String' + } + }, + policyInheritedFrom: { + required: false, + serializedName: 'PolicyInheritedFrom', + type: { + name: 'String' + } + }, + suspensionInfo: { + required: false, + serializedName: 'SuspensionInfo', + type: { + name: 'Composite', + className: 'BackupSuspensionInfo' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceName: { + required: false, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + partitionId: { + required: false, + serializedName: 'PartitionId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PartitionBackupConfigurationInfo; diff --git a/lib/services/serviceFabric/lib/models/partitionBackupEntity.js b/lib/services/serviceFabric/lib/models/partitionBackupEntity.js new file mode 100644 index 0000000000..2533083c48 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionBackupEntity.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Identifies the Service Fabric stateful partition which is being backed up. + * + * @extends models['BackupEntity'] + */ +class PartitionBackupEntity extends models['BackupEntity'] { + /** + * Create a PartitionBackupEntity. + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionBackupEntity + * + * @returns {object} metadata of PartitionBackupEntity + * + */ + mapper() { + return { + required: false, + serializedName: 'Partition', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'PartitionBackupEntity', + modelProperties: { + entityKind: { + required: true, + serializedName: 'EntityKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceName: { + required: false, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + partitionId: { + required: false, + serializedName: 'PartitionId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PartitionBackupEntity; diff --git a/lib/services/serviceFabric/lib/models/partitionDataLossProgress.js b/lib/services/serviceFabric/lib/models/partitionDataLossProgress.js index 6c3d2f3459..610405f2d6 100644 --- a/lib/services/serviceFabric/lib/models/partitionDataLossProgress.js +++ b/lib/services/serviceFabric/lib/models/partitionDataLossProgress.js @@ -19,15 +19,25 @@ const models = require('./index'); class PartitionDataLossProgress { /** * Create a PartitionDataLossProgress. - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [invokeDataLossResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [invokeDataLossResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [invokeDataLossResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [invokeDataLossResult.selectedPartition] - * @member {string} [invokeDataLossResult.selectedPartition.serviceName] - * @member {uuid} [invokeDataLossResult.selectedPartition.partitionId] + * @member {object} [invokeDataLossResult.selectedPartition] This class + * returns information about the partition that the user-induced operation + * acted upon. + * @member {string} [invokeDataLossResult.selectedPartition.serviceName] The + * name of the service the partition belongs to. + * @member {uuid} [invokeDataLossResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This + * is a randomly generated GUID when the service was created. The partition + * ID is unique and does not change for the lifetime of the service. If the + * same service was deleted and recreated the IDs of its partitions would be + * different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/partitionEvent.js b/lib/services/serviceFabric/lib/models/partitionEvent.js new file mode 100644 index 0000000000..ba4a05c79b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionEvent.js @@ -0,0 +1,94 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Partition Events. + * + * @extends models['FabricEvent'] + */ +class PartitionEvent extends models['FabricEvent'] { + /** + * Create a PartitionEvent. + * @member {uuid} partitionId An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionEvent + * + * @returns {object} metadata of PartitionEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PartitionEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionHealth.js b/lib/services/serviceFabric/lib/models/partitionHealth.js index 569499c40b..26bbeace82 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealth.js +++ b/lib/services/serviceFabric/lib/models/partitionHealth.js @@ -20,7 +20,8 @@ const models = require('./index'); class PartitionHealth extends models['EntityHealth'] { /** * Create a PartitionHealth. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] ID of the partition whose health information + * is described by this object. * @member {array} [replicaHealthStates] The list of replica health states * associated with the partition. */ diff --git a/lib/services/serviceFabric/lib/models/partitionHealthEvaluation.js b/lib/services/serviceFabric/lib/models/partitionHealthEvaluation.js index 20790908fd..9f15d593aa 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthEvaluation.js @@ -23,8 +23,12 @@ const models = require('./index'); class PartitionHealthEvaluation extends models['HealthEvaluation'] { /** * Create a PartitionHealthEvaluation. - * @member {uuid} [partitionId] - * @member {array} [unhealthyEvaluations] + * @member {uuid} [partitionId] Id of the partition whose health evaluation + * is described by this object. + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -42,6 +46,11 @@ class PartitionHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Partition', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'PartitionHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -61,6 +70,7 @@ class PartitionHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/partitionHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/partitionHealthReportCreatedEvent.js new file mode 100644 index 0000000000..34db2b81ef --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionHealthReportCreatedEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Health Report Created event. + * + * @extends models['PartitionEvent'] + */ +class PartitionHealthReportCreatedEvent extends models['PartitionEvent'] { + /** + * Create a PartitionHealthReportCreatedEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionHealthReportCreatedEvent + * + * @returns {object} metadata of PartitionHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = PartitionHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js new file mode 100644 index 0000000000..d1f8842de6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionHealthReportExpiredEvent.js @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Health Report Expired event. + * + * @extends models['PartitionEvent'] + */ +class PartitionHealthReportExpiredEvent extends models['PartitionEvent'] { + /** + * Create a PartitionHealthReportExpiredEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionHealthReportExpiredEvent + * + * @returns {object} metadata of PartitionHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = PartitionHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionHealthState.js b/lib/services/serviceFabric/lib/models/partitionHealthState.js index f4a7fd56c2..64935f886d 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthState.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthState.js @@ -21,7 +21,8 @@ const models = require('./index'); class PartitionHealthState extends models['EntityHealthState'] { /** * Create a PartitionHealthState. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition whose health state is + * described by this object. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js b/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js index cdc83afc9b..b931351978 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js @@ -14,7 +14,7 @@ const models = require('./index'); /** * Represents the health state chunk of a partition, which contains the - * partition id, its aggregated health state and any replicas that respect the + * partition ID, its aggregated health state and any replicas that respect the * filters in the cluster health chunk query description. * * @@ -23,8 +23,10 @@ const models = require('./index'); class PartitionHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a PartitionHealthStateChunk. - * @member {uuid} [partitionId] - * @member {object} [replicaHealthStateChunks] + * @member {uuid} [partitionId] The Id of the partition. + * @member {object} [replicaHealthStateChunks] The list of replica health + * state chunks belonging to the partition that respect the filters in the + * cluster health chunk query description. * @member {array} [replicaHealthStateChunks.items] The list of replica * health state chunks that respect the input filters in the chunk query. */ diff --git a/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js b/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js index 81b5815256..f085baf306 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js @@ -42,8 +42,8 @@ class PartitionHealthStateFilter { * 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, + * 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. diff --git a/lib/services/serviceFabric/lib/models/partitionInformation.js b/lib/services/serviceFabric/lib/models/partitionInformation.js index 1d1c22033a..9e335c0fbf 100644 --- a/lib/services/serviceFabric/lib/models/partitionInformation.js +++ b/lib/services/serviceFabric/lib/models/partitionInformation.js @@ -18,7 +18,11 @@ class PartitionInformation { /** * Create a PartitionInformation. - * @member {uuid} [id] + * @member {uuid} [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. * @member {string} servicePartitionKind Polymorphic Discriminator */ constructor() { @@ -53,6 +57,7 @@ class PartitionInformation { servicePartitionKind: { required: true, serializedName: 'ServicePartitionKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/partitionInstanceCountScaleMechanism.js b/lib/services/serviceFabric/lib/models/partitionInstanceCountScaleMechanism.js new file mode 100644 index 0000000000..1cdfeca389 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionInstanceCountScaleMechanism.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents a scaling mechanism for adding or removing instances of stateless + * service partition. + * + * @extends models['ScalingMechanismDescription'] + */ +class PartitionInstanceCountScaleMechanism extends models['ScalingMechanismDescription'] { + /** + * Create a PartitionInstanceCountScaleMechanism. + * @member {number} minInstanceCount Minimum number of instances of the + * partition. + * @member {number} maxInstanceCount Maximum number of instances of the + * partition. + * @member {number} scaleIncrement The number of instances to add or remove + * during a scaling operation. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionInstanceCountScaleMechanism + * + * @returns {object} metadata of PartitionInstanceCountScaleMechanism + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionInstanceCount', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingMechanismDescription', + className: 'PartitionInstanceCountScaleMechanism', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + minInstanceCount: { + required: true, + serializedName: 'MinInstanceCount', + type: { + name: 'Number' + } + }, + maxInstanceCount: { + required: true, + serializedName: 'MaxInstanceCount', + type: { + name: 'Number' + } + }, + scaleIncrement: { + required: true, + serializedName: 'ScaleIncrement', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = PartitionInstanceCountScaleMechanism; diff --git a/lib/services/serviceFabric/lib/models/partitionLoadInformation.js b/lib/services/serviceFabric/lib/models/partitionLoadInformation.js index 9c8d795c4d..9a00a8fdbb 100644 --- a/lib/services/serviceFabric/lib/models/partitionLoadInformation.js +++ b/lib/services/serviceFabric/lib/models/partitionLoadInformation.js @@ -24,7 +24,7 @@ const models = require('./index'); class PartitionLoadInformation { /** * Create a PartitionLoadInformation. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition. * @member {array} [primaryLoadMetricReports] Array of load reports from the * primary replica for this partition. * @member {array} [secondaryLoadMetricReports] Array of aggregated load diff --git a/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js b/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js new file mode 100644 index 0000000000..6677b99a8a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionPrimaryMoveAnalysisEvent.js @@ -0,0 +1,137 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Primary Move Analysis event. + * + * @extends models['PartitionAnalysisEvent'] + */ +class PartitionPrimaryMoveAnalysisEvent extends models['PartitionAnalysisEvent'] { + /** + * Create a PartitionPrimaryMoveAnalysisEvent. + * @member {date} whenMoveCompleted Time when the move was completed. + * @member {string} previousNode The name of a Service Fabric node. + * @member {string} currentNode The name of a Service Fabric node. + * @member {string} moveReason Move reason. + * @member {string} relevantTraces Relevant traces. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionPrimaryMoveAnalysisEvent + * + * @returns {object} metadata of PartitionPrimaryMoveAnalysisEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionPrimaryMoveAnalysis', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionPrimaryMoveAnalysisEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + metadata: { + required: true, + serializedName: 'Metadata', + type: { + name: 'Composite', + className: 'AnalysisEventMetadata' + } + }, + whenMoveCompleted: { + required: true, + serializedName: 'WhenMoveCompleted', + type: { + name: 'DateTime' + } + }, + previousNode: { + required: true, + serializedName: 'PreviousNode', + type: { + name: 'String' + } + }, + currentNode: { + required: true, + serializedName: 'CurrentNode', + type: { + name: 'String' + } + }, + moveReason: { + required: true, + serializedName: 'MoveReason', + type: { + name: 'String' + } + }, + relevantTraces: { + required: true, + serializedName: 'RelevantTraces', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PartitionPrimaryMoveAnalysisEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionQuorumLossProgress.js b/lib/services/serviceFabric/lib/models/partitionQuorumLossProgress.js index 691ca77061..897e3bee8a 100644 --- a/lib/services/serviceFabric/lib/models/partitionQuorumLossProgress.js +++ b/lib/services/serviceFabric/lib/models/partitionQuorumLossProgress.js @@ -19,15 +19,25 @@ const models = require('./index'); class PartitionQuorumLossProgress { /** * Create a PartitionQuorumLossProgress. - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [invokeQuorumLossResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [invokeQuorumLossResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [invokeQuorumLossResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [invokeQuorumLossResult.selectedPartition] + * @member {object} [invokeQuorumLossResult.selectedPartition] This class + * returns information about the partition that the user-induced operation + * acted upon. * @member {string} [invokeQuorumLossResult.selectedPartition.serviceName] - * @member {uuid} [invokeQuorumLossResult.selectedPartition.partitionId] + * The name of the service the partition belongs to. + * @member {uuid} [invokeQuorumLossResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This + * is a randomly generated GUID when the service was created. The partition + * ID is unique and does not change for the lifetime of the service. If the + * same service was deleted and recreated the IDs of its partitions would be + * different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/partitionReconfigurationCompletedEvent.js b/lib/services/serviceFabric/lib/models/partitionReconfigurationCompletedEvent.js new file mode 100644 index 0000000000..8e2a42268b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/partitionReconfigurationCompletedEvent.js @@ -0,0 +1,193 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Partition Reconfiguration Completed event. + * + * @extends models['PartitionEvent'] + */ +class PartitionReconfigurationCompletedEvent extends models['PartitionEvent'] { + /** + * Create a PartitionReconfigurationCompletedEvent. + * @member {string} nodeName The name of a Service Fabric node. + * @member {string} nodeInstanceId Id of Node instance. + * @member {string} serviceType Type of Service. + * @member {number} ccEpochDataLossVersion CcEpochDataLoss version. + * @member {number} ccEpochConfigVersion CcEpochConfig version. + * @member {string} reconfigType Type of reconfiguration. + * @member {string} result Describes reconfiguration result. + * @member {number} phase0DurationMs Duration of Phase0 in milli-seconds. + * @member {number} phase1DurationMs Duration of Phase1 in milli-seconds. + * @member {number} phase2DurationMs Duration of Phase2 in milli-seconds. + * @member {number} phase3DurationMs Duration of Phase3 in milli-seconds. + * @member {number} phase4DurationMs Duration of Phase4 in milli-seconds. + * @member {number} totalDurationMs Total duration in milli-seconds. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PartitionReconfigurationCompletedEvent + * + * @returns {object} metadata of PartitionReconfigurationCompletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'PartitionReconfigurationCompleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionReconfigurationCompletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + nodeName: { + required: true, + serializedName: 'NodeName', + type: { + name: 'String' + } + }, + nodeInstanceId: { + required: true, + serializedName: 'NodeInstanceId', + type: { + name: 'String' + } + }, + serviceType: { + required: true, + serializedName: 'ServiceType', + type: { + name: 'String' + } + }, + ccEpochDataLossVersion: { + required: true, + serializedName: 'CcEpochDataLossVersion', + type: { + name: 'Number' + } + }, + ccEpochConfigVersion: { + required: true, + serializedName: 'CcEpochConfigVersion', + type: { + name: 'Number' + } + }, + reconfigType: { + required: true, + serializedName: 'ReconfigType', + type: { + name: 'String' + } + }, + result: { + required: true, + serializedName: 'Result', + type: { + name: 'String' + } + }, + phase0DurationMs: { + required: true, + serializedName: 'Phase0DurationMs', + type: { + name: 'Number' + } + }, + phase1DurationMs: { + required: true, + serializedName: 'Phase1DurationMs', + type: { + name: 'Number' + } + }, + phase2DurationMs: { + required: true, + serializedName: 'Phase2DurationMs', + type: { + name: 'Number' + } + }, + phase3DurationMs: { + required: true, + serializedName: 'Phase3DurationMs', + type: { + name: 'Number' + } + }, + phase4DurationMs: { + required: true, + serializedName: 'Phase4DurationMs', + type: { + name: 'Number' + } + }, + totalDurationMs: { + required: true, + serializedName: 'TotalDurationMs', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = PartitionReconfigurationCompletedEvent; diff --git a/lib/services/serviceFabric/lib/models/partitionRestartProgress.js b/lib/services/serviceFabric/lib/models/partitionRestartProgress.js index 86efad23b1..36ab5eb778 100644 --- a/lib/services/serviceFabric/lib/models/partitionRestartProgress.js +++ b/lib/services/serviceFabric/lib/models/partitionRestartProgress.js @@ -19,15 +19,25 @@ const models = require('./index'); class PartitionRestartProgress { /** * Create a PartitionRestartProgress. - * @member {string} [state] Possible values include: 'Invalid', 'Running', - * 'RollingBack', 'Completed', 'Faulted', 'Cancelled', 'ForceCancelled' - * @member {object} [restartPartitionResult] + * @member {string} [state] The state of the operation. Possible values + * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', + * 'Cancelled', 'ForceCancelled' + * @member {object} [restartPartitionResult] Represents information about an + * operation in a terminal state (Completed or Faulted). * @member {number} [restartPartitionResult.errorCode] If OperationState is * Completed, this is 0. If OperationState is Faulted, this is an error code * indicating the reason. - * @member {object} [restartPartitionResult.selectedPartition] + * @member {object} [restartPartitionResult.selectedPartition] This class + * returns information about the partition that the user-induced operation + * acted upon. * @member {string} [restartPartitionResult.selectedPartition.serviceName] - * @member {uuid} [restartPartitionResult.selectedPartition.partitionId] + * The name of the service the partition belongs to. + * @member {uuid} [restartPartitionResult.selectedPartition.partitionId] An + * internal ID used by Service Fabric to uniquely identify a partition. This + * is a randomly generated GUID when the service was created. The partition + * ID is unique and does not change for the lifetime of the service. If the + * same service was deleted and recreated the IDs of its partitions would be + * different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/partitionSafetyCheck.js b/lib/services/serviceFabric/lib/models/partitionSafetyCheck.js index 4f500893ea..20346af247 100644 --- a/lib/services/serviceFabric/lib/models/partitionSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/partitionSafetyCheck.js @@ -21,7 +21,8 @@ const models = require('./index'); class PartitionSafetyCheck extends models['SafetyCheck'] { /** * Create a PartitionSafetyCheck. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition which is undergoing the + * safety check. */ constructor() { super(); @@ -39,11 +40,17 @@ class PartitionSafetyCheck extends models['SafetyCheck'] { serializedName: 'PartitionSafetyCheck', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'PartitionSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/partitionSchemeDescription.js b/lib/services/serviceFabric/lib/models/partitionSchemeDescription.js index 012b278aad..a4f278c3d0 100644 --- a/lib/services/serviceFabric/lib/models/partitionSchemeDescription.js +++ b/lib/services/serviceFabric/lib/models/partitionSchemeDescription.js @@ -44,6 +44,7 @@ class PartitionSchemeDescription { partitionScheme: { required: true, serializedName: 'PartitionScheme', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/partitionsHealthEvaluation.js b/lib/services/serviceFabric/lib/models/partitionsHealthEvaluation.js index 12b1dfa9ed..e2d0c11563 100644 --- a/lib/services/serviceFabric/lib/models/partitionsHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/partitionsHealthEvaluation.js @@ -28,7 +28,9 @@ class PartitionsHealthEvaluation extends models['HealthEvaluation'] { * ServiceTypeHealthPolicy. * @member {number} [totalCount] Total number of partitions of the service * from the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * PartitionHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -46,6 +48,11 @@ class PartitionsHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Partitions', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'PartitionsHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -65,6 +72,7 @@ class PartitionsHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/primaryReplicatorStatus.js b/lib/services/serviceFabric/lib/models/primaryReplicatorStatus.js index 991df58fcf..6d9c0a143e 100644 --- a/lib/services/serviceFabric/lib/models/primaryReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/primaryReplicatorStatus.js @@ -13,13 +13,16 @@ const models = require('./index'); /** - * Class representing a PrimaryReplicatorStatus. + * Provides statistics about the Service Fabric Replicator, when it is + * functioning in a Primary role. + * * @extends models['ReplicatorStatus'] */ class PrimaryReplicatorStatus extends models['ReplicatorStatus'] { /** * Create a PrimaryReplicatorStatus. - * @member {object} [replicationQueueStatus] + * @member {object} [replicationQueueStatus] Details about the replication + * queue on the primary replicator. * @member {number} [replicationQueueStatus.queueUtilizationPercentage] * 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. @@ -45,7 +48,8 @@ class PrimaryReplicatorStatus extends models['ReplicatorStatus'] { * @member {string} [replicationQueueStatus.lastSequenceNumber] Represents * the latest sequence number of the operation that is available in the * queue. - * @member {array} [remoteReplicators] + * @member {array} [remoteReplicators] The status of all the active and idle + * secondary replicators that the primary is aware of. */ constructor() { super(); @@ -63,11 +67,17 @@ class PrimaryReplicatorStatus extends models['ReplicatorStatus'] { serializedName: 'Primary', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicatorStatus', className: 'PrimaryReplicatorStatus', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/processDeactivatedEvent.js b/lib/services/serviceFabric/lib/models/processDeactivatedEvent.js new file mode 100644 index 0000000000..f1da294ad5 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/processDeactivatedEvent.js @@ -0,0 +1,187 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Process Deactivated event. + * + * @extends models['ApplicationEvent'] + */ +class ProcessDeactivatedEvent extends models['ApplicationEvent'] { + /** + * Create a ProcessDeactivatedEvent. + * @member {string} serviceName Name of Service. + * @member {string} servicePackageName Name of Service package. + * @member {string} servicePackageActivationId Activation Id of Service + * package. + * @member {boolean} isExclusive Indicates IsExclusive flag. + * @member {string} codePackageName Name of Code package. + * @member {string} entryPointType Type of EntryPoint. + * @member {string} exeName Name of executable. + * @member {number} processId Process Id. + * @member {string} hostId Host Id. + * @member {number} exitCode Exit code of process. + * @member {boolean} unexpectedTermination Indicates if termination is + * unexpected. + * @member {date} startTime Start time of process. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ProcessDeactivatedEvent + * + * @returns {object} metadata of ProcessDeactivatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ProcessDeactivated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ProcessDeactivatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationId: { + required: true, + serializedName: 'ApplicationId', + type: { + name: 'String' + } + }, + serviceName: { + required: true, + serializedName: 'ServiceName', + type: { + name: 'String' + } + }, + servicePackageName: { + required: true, + serializedName: 'ServicePackageName', + type: { + name: 'String' + } + }, + servicePackageActivationId: { + required: true, + serializedName: 'ServicePackageActivationId', + type: { + name: 'String' + } + }, + isExclusive: { + required: true, + serializedName: 'IsExclusive', + type: { + name: 'Boolean' + } + }, + codePackageName: { + required: true, + serializedName: 'CodePackageName', + type: { + name: 'String' + } + }, + entryPointType: { + required: true, + serializedName: 'EntryPointType', + type: { + name: 'String' + } + }, + exeName: { + required: true, + serializedName: 'ExeName', + type: { + name: 'String' + } + }, + processId: { + required: true, + serializedName: 'ProcessId', + type: { + name: 'Number' + } + }, + hostId: { + required: true, + serializedName: 'HostId', + type: { + name: 'String' + } + }, + exitCode: { + required: true, + serializedName: 'ExitCode', + type: { + name: 'Number' + } + }, + unexpectedTermination: { + required: true, + serializedName: 'UnexpectedTermination', + type: { + name: 'Boolean' + } + }, + startTime: { + required: true, + serializedName: 'StartTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ProcessDeactivatedEvent; diff --git a/lib/services/serviceFabric/lib/models/propertyBatchDescriptionList.js b/lib/services/serviceFabric/lib/models/propertyBatchDescriptionList.js new file mode 100644 index 0000000000..ceb53ccf31 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyBatchDescriptionList.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a list of property batch operations to be executed. Either all or + * none of the operations will be committed. + * + */ +class PropertyBatchDescriptionList { + /** + * Create a PropertyBatchDescriptionList. + * @member {array} [operations] A list of the property batch operations to be + * executed. + */ + constructor() { + } + + /** + * Defines the metadata of PropertyBatchDescriptionList + * + * @returns {object} metadata of PropertyBatchDescriptionList + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyBatchDescriptionList', + type: { + name: 'Composite', + className: 'PropertyBatchDescriptionList', + modelProperties: { + operations: { + required: false, + serializedName: 'Operations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PropertyBatchOperationElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'PropertyBatchOperation' + } + } + } + } + } + } + }; + } +} + +module.exports = PropertyBatchDescriptionList; diff --git a/lib/services/serviceFabric/lib/models/propertyBatchInfo.js b/lib/services/serviceFabric/lib/models/propertyBatchInfo.js new file mode 100644 index 0000000000..47501112ff --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyBatchInfo.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Information about the results of a property batch. + * + */ +class PropertyBatchInfo { + /** + * Create a PropertyBatchInfo. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of PropertyBatchInfo + * + * @returns {object} metadata of PropertyBatchInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyBatchInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchInfo', + className: 'PropertyBatchInfo', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PropertyBatchInfo; diff --git a/lib/services/serviceFabric/lib/models/propertyBatchOperation.js b/lib/services/serviceFabric/lib/models/propertyBatchOperation.js new file mode 100644 index 0000000000..f10f324ecc --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyBatchOperation.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Represents the base type for property operations that can be put into a + * batch and submitted. + * + */ +class PropertyBatchOperation { + /** + * Create a PropertyBatchOperation. + * @member {string} propertyName The name of the Service Fabric property. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of PropertyBatchOperation + * + * @returns {object} metadata of PropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyBatchOperation', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'PropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/propertyDescription.js b/lib/services/serviceFabric/lib/models/propertyDescription.js new file mode 100644 index 0000000000..b036b83d25 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyDescription.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Description of a Service Fabric property. + * + */ +class PropertyDescription { + /** + * Create a PropertyDescription. + * @member {string} propertyName The name of the Service Fabric property. + * @member {string} [customTypeId] The property's custom type id. Using this + * property, the user is able to tag the type of the value of the property. + * @member {object} value Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of PropertyDescription + * + * @returns {object} metadata of PropertyDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyDescription', + type: { + name: 'Composite', + className: 'PropertyDescription', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + customTypeId: { + required: false, + serializedName: 'CustomTypeId', + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'Value', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'PropertyValue' + } + } + } + } + }; + } +} + +module.exports = PropertyDescription; diff --git a/lib/services/serviceFabric/lib/models/propertyInfo.js b/lib/services/serviceFabric/lib/models/propertyInfo.js new file mode 100644 index 0000000000..68f125735d --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyInfo.js @@ -0,0 +1,93 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Information about a Service Fabric property. + * + */ +class PropertyInfo { + /** + * Create a PropertyInfo. + * @member {string} name The name of the Service Fabric property. + * @member {object} [value] Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + * @member {object} metadata The metadata associated with a property, + * including the property's name. + * @member {string} [metadata.typeId] The kind of property, determined by the + * type of data. Following are the possible values. Possible values include: + * 'Invalid', 'Binary', 'Int64', 'Double', 'String', 'Guid' + * @member {string} [metadata.customTypeId] The property's custom type id. + * @member {string} [metadata.parent] The name of the parent Service Fabric + * Name for the property. It could be thought of as the namespace/table under + * which the property exists. + * @member {number} [metadata.sizeInBytes] The length of the serialized + * property value. + * @member {date} [metadata.lastModifiedUtcTimestamp] Represents when the + * Property was last modified. Only write operations will cause this field to + * be updated. + * @member {string} [metadata.sequenceNumber] The version of the property. + * Every time a property is modified, its sequence number is increased. + */ + constructor() { + } + + /** + * Defines the metadata of PropertyInfo + * + * @returns {object} metadata of PropertyInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyInfo', + type: { + name: 'Composite', + className: 'PropertyInfo', + modelProperties: { + name: { + required: true, + serializedName: 'Name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'Value', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'PropertyValue' + } + }, + metadata: { + required: true, + serializedName: 'Metadata', + type: { + name: 'Composite', + className: 'PropertyMetadata' + } + } + } + } + }; + } +} + +module.exports = PropertyInfo; diff --git a/lib/services/serviceFabric/lib/models/propertyMetadata.js b/lib/services/serviceFabric/lib/models/propertyMetadata.js new file mode 100644 index 0000000000..e9b81082f4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyMetadata.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The metadata associated with a property, including the property's name. + * + */ +class PropertyMetadata { + /** + * Create a PropertyMetadata. + * @member {string} [typeId] The kind of property, determined by the type of + * data. Following are the possible values. Possible values include: + * 'Invalid', 'Binary', 'Int64', 'Double', 'String', 'Guid' + * @member {string} [customTypeId] The property's custom type id. + * @member {string} [parent] The name of the parent Service Fabric Name for + * the property. It could be thought of as the namespace/table under which + * the property exists. + * @member {number} [sizeInBytes] The length of the serialized property + * value. + * @member {date} [lastModifiedUtcTimestamp] Represents when the Property was + * last modified. Only write operations will cause this field to be updated. + * @member {string} [sequenceNumber] The version of the property. Every time + * a property is modified, its sequence number is increased. + */ + constructor() { + } + + /** + * Defines the metadata of PropertyMetadata + * + * @returns {object} metadata of PropertyMetadata + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyMetadata', + type: { + name: 'Composite', + className: 'PropertyMetadata', + modelProperties: { + typeId: { + required: false, + serializedName: 'TypeId', + type: { + name: 'String' + } + }, + customTypeId: { + required: false, + serializedName: 'CustomTypeId', + type: { + name: 'String' + } + }, + parent: { + required: false, + serializedName: 'Parent', + type: { + name: 'String' + } + }, + sizeInBytes: { + required: false, + serializedName: 'SizeInBytes', + type: { + name: 'Number' + } + }, + lastModifiedUtcTimestamp: { + required: false, + serializedName: 'LastModifiedUtcTimestamp', + type: { + name: 'DateTime' + } + }, + sequenceNumber: { + required: false, + serializedName: 'SequenceNumber', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PropertyMetadata; diff --git a/lib/services/serviceFabric/lib/models/propertyValue.js b/lib/services/serviceFabric/lib/models/propertyValue.js new file mode 100644 index 0000000000..1586928290 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/propertyValue.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes a Service Fabric property value. + * + */ +class PropertyValue { + /** + * Create a PropertyValue. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of PropertyValue + * + * @returns {object} metadata of PropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'PropertyValue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'PropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PropertyValue; diff --git a/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescription.js b/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescription.js new file mode 100644 index 0000000000..954ec3fd92 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescription.js @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the operation to register or provision an application type using + * an application package uploaded to the Service Fabric image store. + * + * @extends models['ProvisionApplicationTypeDescriptionBase'] + */ +class ProvisionApplicationTypeDescription extends models['ProvisionApplicationTypeDescriptionBase'] { + /** + * Create a ProvisionApplicationTypeDescription. + * @member {string} applicationTypeBuildPath The relative path for the + * application package in the image store specified during the prior upload + * operation. + * @member {string} [applicationPackageCleanupPolicy] 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' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ProvisionApplicationTypeDescription + * + * @returns {object} metadata of ProvisionApplicationTypeDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ImageStorePath', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ProvisionApplicationTypeDescriptionBase', + className: 'ProvisionApplicationTypeDescription', + modelProperties: { + async: { + required: true, + serializedName: 'Async', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + applicationTypeBuildPath: { + required: true, + serializedName: 'ApplicationTypeBuildPath', + type: { + name: 'String' + } + }, + applicationPackageCleanupPolicy: { + required: false, + serializedName: 'ApplicationPackageCleanupPolicy', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProvisionApplicationTypeDescription; diff --git a/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescriptionBase.js b/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescriptionBase.js new file mode 100644 index 0000000000..073aba7f7c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/provisionApplicationTypeDescriptionBase.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * 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. + * + */ +class ProvisionApplicationTypeDescriptionBase { + /** + * Create a ProvisionApplicationTypeDescriptionBase. + * @member {boolean} async 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. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ProvisionApplicationTypeDescriptionBase + * + * @returns {object} metadata of ProvisionApplicationTypeDescriptionBase + * + */ + mapper() { + return { + required: false, + serializedName: 'ProvisionApplicationTypeDescriptionBase', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ProvisionApplicationTypeDescriptionBase', + className: 'ProvisionApplicationTypeDescriptionBase', + modelProperties: { + async: { + required: true, + serializedName: 'Async', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProvisionApplicationTypeDescriptionBase; diff --git a/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js new file mode 100644 index 0000000000..3fe958d3e4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * 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. + * + * + * @extends models['PropertyBatchOperation'] + */ +class PutPropertyBatchOperation extends models['PropertyBatchOperation'] { + /** + * Create a PutPropertyBatchOperation. + * @member {object} value Describes a Service Fabric property value. + * @member {string} [value.kind] Polymorphic Discriminator + * @member {string} [customTypeId] The property's custom type id. Using this + * property, the user is able to tag the type of the value of the property. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PutPropertyBatchOperation + * + * @returns {object} metadata of PutPropertyBatchOperation + * + */ + mapper() { + return { + required: false, + serializedName: 'Put', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchOperation', + className: 'PutPropertyBatchOperation', + modelProperties: { + propertyName: { + required: true, + serializedName: 'PropertyName', + type: { + name: 'String' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + value: { + required: true, + serializedName: 'Value', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'PropertyValue' + } + }, + customTypeId: { + required: false, + serializedName: 'CustomTypeId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PutPropertyBatchOperation; diff --git a/lib/services/serviceFabric/lib/models/reconfigurationInformation.js b/lib/services/serviceFabric/lib/models/reconfigurationInformation.js index 64cf45b7f8..be89980076 100644 --- a/lib/services/serviceFabric/lib/models/reconfigurationInformation.js +++ b/lib/services/serviceFabric/lib/models/reconfigurationInformation.js @@ -18,13 +18,17 @@ class ReconfigurationInformation { /** * Create a ReconfigurationInformation. - * @member {string} [previousConfigurationRole] Possible values include: - * 'Unknown', 'None', 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {string} [reconfigurationPhase] Possible values include: - * 'Unknown', 'None', 'Phase0', 'Phase1', 'Phase2', 'Phase3', 'Phase4', - * 'AbortPhaseZero' - * @member {string} [reconfigurationType] Possible values include: 'Unknown', - * 'SwapPrimary', 'Failover', 'Other' + * @member {string} [previousConfigurationRole] Replica role before + * reconfiguration started. Possible values include: 'Unknown', 'None', + * 'Primary', 'IdleSecondary', 'ActiveSecondary' + * @member {string} [reconfigurationPhase] 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' + * @member {string} [reconfigurationType] Type of current ongoing + * reconfiguration. If no reconfiguration is taking place then this value + * will be "None". Possible values include: 'Unknown', 'SwapPrimary', + * 'Failover', 'Other' * @member {date} [reconfigurationStartTimeUtc] Start time (in UTC) of the * ongoing reconfiguration. If no reconfiguration is taking place then this * value will be zero date-time. diff --git a/lib/services/serviceFabric/lib/models/remoteReplicatorAcknowledgementStatus.js b/lib/services/serviceFabric/lib/models/remoteReplicatorAcknowledgementStatus.js index 46f78ab28f..6d5d0c0d90 100644 --- a/lib/services/serviceFabric/lib/models/remoteReplicatorAcknowledgementStatus.js +++ b/lib/services/serviceFabric/lib/models/remoteReplicatorAcknowledgementStatus.js @@ -20,7 +20,9 @@ const models = require('./index'); class RemoteReplicatorAcknowledgementStatus { /** * Create a RemoteReplicatorAcknowledgementStatus. - * @member {object} [replicationStreamAcknowledgementDetail] + * @member {object} [replicationStreamAcknowledgementDetail] Details about + * the acknowledgements for operations that are part of the replication + * stream data. * @member {string} * [replicationStreamAcknowledgementDetail.averageReceiveDuration] Represents * the average duration it takes for the remote replicator to receive an @@ -36,7 +38,8 @@ class RemoteReplicatorAcknowledgementStatus { * [replicationStreamAcknowledgementDetail.receivedAndNotAppliedCount] * Represents the number of operations received and not yet applied by a * remote replicator. - * @member {object} [copyStreamAcknowledgementDetail] + * @member {object} [copyStreamAcknowledgementDetail] Details about the + * acknowledgements for operations that are part of the copy stream data. * @member {string} [copyStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to * receive an operation. diff --git a/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js b/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js index 22edbb0d35..a3fb6f9669 100644 --- a/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js @@ -21,7 +21,8 @@ const models = require('./index'); class RemoteReplicatorStatus { /** * Create a RemoteReplicatorStatus. - * @member {string} [replicaId] + * @member {string} [replicaId] Represents the replica ID of the remote + * secondary replicator. * @member {date} [lastAcknowledgementProcessedTimeUtc] The last timestamp * (in UTC) when an acknowledgement from the secondary replicator was * processed on the primary. @@ -43,9 +44,12 @@ class RemoteReplicatorStatus { * 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. - * @member {object} [remoteReplicatorAcknowledgementStatus] + * @member {object} [remoteReplicatorAcknowledgementStatus] Represents the + * acknowledgment status for the remote secondary replicator. * @member {object} * [remoteReplicatorAcknowledgementStatus.replicationStreamAcknowledgementDetail] + * Details about the acknowledgements for operations that are part of the + * replication stream data. * @member {string} * [remoteReplicatorAcknowledgementStatus.replicationStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to @@ -64,6 +68,8 @@ class RemoteReplicatorStatus { * remote replicator. * @member {object} * [remoteReplicatorAcknowledgementStatus.copyStreamAcknowledgementDetail] + * Details about the acknowledgements for operations that are part of the + * copy stream data. * @member {string} * [remoteReplicatorAcknowledgementStatus.copyStreamAcknowledgementDetail.averageReceiveDuration] * Represents the average duration it takes for the remote replicator to diff --git a/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js b/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js index d7bc20dc2f..6911bf13ec 100644 --- a/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js +++ b/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js @@ -48,6 +48,7 @@ class RepairImpactDescriptionBase { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js b/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js index 48f404230a..c5d5ccfbd5 100644 --- a/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js +++ b/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js @@ -48,6 +48,7 @@ class RepairTargetDescriptionBase { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/repairTask.js b/lib/services/serviceFabric/lib/models/repairTask.js index 65c7545442..4745b29e80 100644 --- a/lib/services/serviceFabric/lib/models/repairTask.js +++ b/lib/services/serviceFabric/lib/models/repairTask.js @@ -37,25 +37,9 @@ class RepairTask { * task, or other informational details. * May be set when the repair task is created, and is immutable once set. * @member {string} state The workflow state of the repair task. Valid - * initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the - * Repair Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * @member {number} [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 @@ -63,34 +47,25 @@ class RepairTask { * - 4 - Approval of the repair was forced via client request * @member {string} action The requested repair action. Must be specified * when the repair task is created, and is immutable once set. - * @member {object} [target] + * @member {object} [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. * @member {string} [target.kind] Polymorphic Discriminator * @member {string} [executor] The name of the repair executor. Must be * specified in Claimed and later states, and is immutable once set. * @member {string} [executorData] A data string that the repair executor can * use to store its internal state. - * @member {object} [impact] + * @member {object} [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. * @member {string} [impact.kind] Polymorphic Discriminator * @member {string} [resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was - * interrupted by a cancellation request after some work had already been - * performed. - * - Failed - Indicates that there was a failure during execution of the - * repair task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * @member {number} [resultCode] 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 @@ -99,7 +74,10 @@ class RepairTask { * about the result of the repair task execution. * May be specified in the Restoring and later states, and is immutable once * set. - * @member {object} [history] + * @member {object} [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. * @member {date} [history.createdUtcTimestamp] The time when the repair task * entered the Created state. * @member {date} [history.claimedUtcTimestamp] The time when the repair task @@ -122,10 +100,14 @@ class RepairTask { * when the repair task started the health check in the Restoring state. * @member {date} [history.restoringHealthCheckEndUtcTimestamp] The time when * the repair task completed the health check in the Restoring state. - * @member {string} [preparingHealthCheckState] Possible values include: - * 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - * @member {string} [restoringHealthCheckState] Possible values include: - * 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @member {string} [preparingHealthCheckState] The workflow state of the + * health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * @member {string} [restoringHealthCheckState] The workflow state of the + * health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * @member {boolean} [performPreparingHealthCheck] A value to determine if * health checks will be performed when the repair task enters the Preparing * state. diff --git a/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js b/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js index 2796ee16f9..e77e64eecf 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js @@ -25,7 +25,7 @@ class RepairTaskApproveDescription { * @member {string} [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. + * is performed. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js b/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js index 828d4bb7c6..a716641ff4 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js @@ -25,10 +25,10 @@ class RepairTaskCancelDescription { * @member {string} [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. + * is performed. * @member {boolean} [requestAbort] _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. + * repair should be cancelled only if execution has not yet started. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/replicaEvent.js b/lib/services/serviceFabric/lib/models/replicaEvent.js new file mode 100644 index 0000000000..ef65c8cb3b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/replicaEvent.js @@ -0,0 +1,108 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Replica Events. + * + * @extends models['FabricEvent'] + */ +class ReplicaEvent extends models['FabricEvent'] { + /** + * Create a ReplicaEvent. + * @member {uuid} partitionId An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + * @member {string} replicaId 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. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ReplicaEvent + * + * @returns {object} metadata of ReplicaEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ReplicaEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ReplicaEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ReplicaEvent; diff --git a/lib/services/serviceFabric/lib/models/replicaHealth.js b/lib/services/serviceFabric/lib/models/replicaHealth.js index 0eed573e57..d37014f36f 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealth.js +++ b/lib/services/serviceFabric/lib/models/replicaHealth.js @@ -24,7 +24,8 @@ const models = require('./index'); class ReplicaHealth extends models['EntityHealth'] { /** * Create a ReplicaHealth. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] Id of the partition to which this replica + * belongs. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -105,6 +106,7 @@ class ReplicaHealth extends models['EntityHealth'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicaHealthEvaluation.js b/lib/services/serviceFabric/lib/models/replicaHealthEvaluation.js index 399caee136..c9a03ef5b3 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthEvaluation.js @@ -23,9 +23,21 @@ const models = require('./index'); class ReplicaHealthEvaluation extends models['HealthEvaluation'] { /** * Create a ReplicaHealthEvaluation. - * @member {uuid} [partitionId] - * @member {string} [replicaOrInstanceId] - * @member {array} [unhealthyEvaluations] + * @member {uuid} [partitionId] Id of the partition to which the replica + * belongs. + * @member {string} [replicaOrInstanceId] 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. + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the current aggregated health state of the replica. The types of + * the unhealthy evaluations can be EventHealthEvaluation. */ constructor() { super(); @@ -43,6 +55,11 @@ class ReplicaHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Replica', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ReplicaHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -62,6 +79,7 @@ class ReplicaHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicaHealthState.js b/lib/services/serviceFabric/lib/models/replicaHealthState.js index f1453fed8d..e2170c9665 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthState.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthState.js @@ -21,7 +21,8 @@ const models = require('./index'); class ReplicaHealthState extends models['EntityHealthState'] { /** * Create a ReplicaHealthState. - * @member {uuid} [partitionId] + * @member {uuid} [partitionId] The ID of the partition to which this replica + * belongs. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -64,6 +65,7 @@ class ReplicaHealthState extends models['EntityHealthState'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js b/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js index e6b6c60f28..0f2f1413bf 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js @@ -24,7 +24,16 @@ const models = require('./index'); class ReplicaHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a ReplicaHealthStateChunk. - * @member {string} [replicaOrInstanceId] + * @member {string} [replicaOrInstanceId] 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. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js b/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js index 087e3ae4a2..a84bb6a0ff 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js @@ -26,7 +26,7 @@ class ReplicaHealthStateFilter { /** * Create a ReplicaHealthStateFilter. * @member {string} [replicaOrInstanceIdFilter] Id of the stateful service - * replica or stateles service instance that matches the filter. The filter + * 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. @@ -41,8 +41,8 @@ class ReplicaHealthStateFilter { * 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, + * 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. diff --git a/lib/services/serviceFabric/lib/models/replicaInfo.js b/lib/services/serviceFabric/lib/models/replicaInfo.js index ad9a3095a6..2d15886ec9 100644 --- a/lib/services/serviceFabric/lib/models/replicaInfo.js +++ b/lib/services/serviceFabric/lib/models/replicaInfo.js @@ -18,11 +18,13 @@ class ReplicaInfo { /** * Create a ReplicaInfo. - * @member {string} [replicaStatus] Possible values include: 'Invalid', - * 'InBuild', 'Standby', 'Ready', 'Down', 'Dropped' - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [nodeName] + * @member {string} [replicaStatus] The status of a replica of a service. + * Possible values include: 'Invalid', 'InBuild', 'Standby', 'Ready', 'Down', + * 'Dropped' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [nodeName] The name of a Service Fabric node. * @member {string} [address] The address the replica is listening on. * @member {string} [lastInBuildDurationInSeconds] The last in build duration * of the replica in seconds. @@ -88,6 +90,7 @@ class ReplicaInfo { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicaStatusBase.js b/lib/services/serviceFabric/lib/models/replicaStatusBase.js index 409e39e292..460ab23827 100644 --- a/lib/services/serviceFabric/lib/models/replicaStatusBase.js +++ b/lib/services/serviceFabric/lib/models/replicaStatusBase.js @@ -44,6 +44,7 @@ class ReplicaStatusBase { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicasHealthEvaluation.js b/lib/services/serviceFabric/lib/models/replicasHealthEvaluation.js index 6c2e4b77a7..8f674dc452 100644 --- a/lib/services/serviceFabric/lib/models/replicasHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/replicasHealthEvaluation.js @@ -28,7 +28,9 @@ class ReplicasHealthEvaluation extends models['HealthEvaluation'] { * ApplicationHealthPolicy. * @member {number} [totalCount] Total number of replicas in the partition * from the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ReplicaHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -46,6 +48,11 @@ class ReplicasHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Replicas', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ReplicasHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -65,6 +72,7 @@ class ReplicasHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/replicatorStatus.js b/lib/services/serviceFabric/lib/models/replicatorStatus.js index 1c3383da58..2d831e1036 100644 --- a/lib/services/serviceFabric/lib/models/replicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/replicatorStatus.js @@ -48,6 +48,7 @@ class ReplicatorStatus { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/resolvedServiceEndpoint.js b/lib/services/serviceFabric/lib/models/resolvedServiceEndpoint.js index f744befead..d3aa347121 100644 --- a/lib/services/serviceFabric/lib/models/resolvedServiceEndpoint.js +++ b/lib/services/serviceFabric/lib/models/resolvedServiceEndpoint.js @@ -17,7 +17,8 @@ class ResolvedServiceEndpoint { /** * Create a ResolvedServiceEndpoint. - * @member {string} [kind] Possible values include: 'Invalid', 'Stateless', + * @member {string} [kind] The role of the replica where the endpoint is + * reported. Possible values include: 'Invalid', 'Stateless', * 'StatefulPrimary', 'StatefulSecondary' * @member {string} [address] The address of the endpoint. If the endpoint * has multiple listeners the address is a JSON object with one property per diff --git a/lib/services/serviceFabric/lib/models/resolvedServicePartition.js b/lib/services/serviceFabric/lib/models/resolvedServicePartition.js index 1fda991eee..5dc11c07d9 100644 --- a/lib/services/serviceFabric/lib/models/resolvedServicePartition.js +++ b/lib/services/serviceFabric/lib/models/resolvedServicePartition.js @@ -19,12 +19,19 @@ const models = require('./index'); class ResolvedServicePartition { /** * Create a ResolvedServicePartition. - * @member {string} name - * @member {object} partitionInformation - * @member {uuid} [partitionInformation.id] + * @member {string} name The full name of the service with 'fabric:' URI + * scheme. + * @member {object} partitionInformation A representation of the resolved + * partition. + * @member {uuid} [partitionInformation.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. * @member {string} [partitionInformation.servicePartitionKind] Polymorphic * Discriminator - * @member {array} endpoints + * @member {array} endpoints List of resolved service endpoints of a service + * partition. * @member {string} version 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. diff --git a/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js b/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js index 82b9ea352a..5f8662dbf1 100644 --- a/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js +++ b/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js @@ -11,7 +11,7 @@ 'use strict'; /** - * Defines description for restarting a deloyed code package on Service Fabric + * Defines description for restarting a deployed code package on Service Fabric * node. * * @@ -19,10 +19,26 @@ class RestartDeployedCodePackageDescription { /** * Create a RestartDeployedCodePackageDescription. - * @member {string} serviceManifestName - * @member {string} [servicePackageActivationId] - * @member {string} codePackageName - * @member {string} codePackageInstanceId + * @member {string} serviceManifestName The name of service manifest that + * specified this code package. + * @member {string} [servicePackageActivationId] 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. + * @member {string} codePackageName The name of the code package defined in + * the service manifest. + * @member {string} codePackageInstanceId 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/restartNodeDescription.js b/lib/services/serviceFabric/lib/models/restartNodeDescription.js index 0304dd8c8e..5f807df334 100644 --- a/lib/services/serviceFabric/lib/models/restartNodeDescription.js +++ b/lib/services/serviceFabric/lib/models/restartNodeDescription.js @@ -17,10 +17,10 @@ class RestartNodeDescription { /** * Create a RestartNodeDescription. - * @member {string} nodeInstanceId The instance id of the target node. If - * instance id is specified the node is restarted only if it matches with the + * @member {string} nodeInstanceId 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 + * instance ID. The instance ID can be obtained using get node query. Default * value: '0' . * @member {string} [createFabricDump] Specify True to create a dump of the * fabric node process. This is case sensitive. Possible values include: diff --git a/lib/services/serviceFabric/lib/models/restartPartitionResult.js b/lib/services/serviceFabric/lib/models/restartPartitionResult.js index 3dd4588449..d986006741 100644 --- a/lib/services/serviceFabric/lib/models/restartPartitionResult.js +++ b/lib/services/serviceFabric/lib/models/restartPartitionResult.js @@ -22,9 +22,15 @@ class RestartPartitionResult { * Create a RestartPartitionResult. * @member {number} [errorCode] If OperationState is Completed, this is 0. * If OperationState is Faulted, this is an error code indicating the reason. - * @member {object} [selectedPartition] - * @member {string} [selectedPartition.serviceName] - * @member {uuid} [selectedPartition.partitionId] + * @member {object} [selectedPartition] This class returns information about + * the partition that the user-induced operation acted upon. + * @member {string} [selectedPartition.serviceName] The name of the service + * the partition belongs to. + * @member {uuid} [selectedPartition.partitionId] An internal ID used by + * Service Fabric to uniquely identify a partition. This is a randomly + * generated GUID when the service was created. The partition ID is unique + * and does not change for the lifetime of the service. If the same service + * was deleted and recreated the IDs of its partitions would be different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/restorePartitionDescription.js b/lib/services/serviceFabric/lib/models/restorePartitionDescription.js new file mode 100644 index 0000000000..57b2ca7dc6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/restorePartitionDescription.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Specifies the parameters needed to trigger a restore of a specific + * partition. + * + */ +class RestorePartitionDescription { + /** + * Create a RestorePartitionDescription. + * @member {uuid} backupId Unique backup ID. + * @member {string} backupLocation Location of the backup relative to the + * backup storage specified/ configured. + * @member {object} [backupStorage] Location of the backup from where the + * partition will be restored. + * @member {string} [backupStorage.friendlyName] Friendly name for this + * backup storage. + * @member {string} [backupStorage.storageKind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of RestorePartitionDescription + * + * @returns {object} metadata of RestorePartitionDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'RestorePartitionDescription', + type: { + name: 'Composite', + className: 'RestorePartitionDescription', + modelProperties: { + backupId: { + required: true, + serializedName: 'BackupId', + type: { + name: 'String' + } + }, + backupLocation: { + required: true, + serializedName: 'BackupLocation', + type: { + name: 'String' + } + }, + backupStorage: { + required: false, + serializedName: 'BackupStorage', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'StorageKind', + clientName: 'storageKind' + }, + uberParent: 'BackupStorageDescription', + className: 'BackupStorageDescription' + } + } + } + } + }; + } +} + +module.exports = RestorePartitionDescription; diff --git a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js new file mode 100644 index 0000000000..10bab0009c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js @@ -0,0 +1,256 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the progress of a restore operation on a partition. + * + */ +class RestoreProgressInfo { + /** + * Create a RestoreProgressInfo. + * @member {string} [restoreState] Represents the current state of the + * partition restore operation. + * . Possible values include: 'Invalid', 'Accepted', 'RestoreInProgress', + * 'Success', 'Failure', 'Timeout' + * @member {date} [timeStampUtc] Timestamp when operation succeeded or + * failed. + * @member {object} [restoredEpoch] Describes the epoch at which the + * partition is restored. + * @member {string} [restoredEpoch.configurationVersion] 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. + * @member {string} [restoredEpoch.dataLossVersion] The current dataloss + * 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. + * @member {string} [restoredLsn] Restored LSN. + * @member {object} [failureError] Denotes the failure encountered in + * performing restore operation. + * @member {string} [failureError.code] 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" + * + * - 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" + * + * - 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' + * @member {string} [failureError.message] Error message. + */ + constructor() { + } + + /** + * Defines the metadata of RestoreProgressInfo + * + * @returns {object} metadata of RestoreProgressInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'RestoreProgressInfo', + type: { + name: 'Composite', + className: 'RestoreProgressInfo', + modelProperties: { + restoreState: { + required: false, + serializedName: 'RestoreState', + type: { + name: 'String' + } + }, + timeStampUtc: { + required: false, + serializedName: 'TimeStampUtc', + type: { + name: 'DateTime' + } + }, + restoredEpoch: { + required: false, + serializedName: 'RestoredEpoch', + type: { + name: 'Composite', + className: 'Epoch' + } + }, + restoredLsn: { + required: false, + serializedName: 'RestoredLsn', + type: { + name: 'String' + } + }, + failureError: { + required: false, + serializedName: 'FailureError', + type: { + name: 'Composite', + className: 'FabricErrorError' + } + } + } + } + }; + } +} + +module.exports = RestoreProgressInfo; diff --git a/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js b/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js index bc8b256d4f..0a70719bc3 100644 --- a/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js @@ -18,18 +18,53 @@ class RollingUpgradeUpdateDescription { /** * Create a RollingUpgradeUpdateDescription. - * @member {string} rollingUpgradeMode Possible values include: 'Invalid', - * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: - * 'UnmonitoredAuto' . - * @member {boolean} [forceRestart] - * @member {number} [replicaSetCheckTimeoutInMilliseconds] - * @member {string} [failureAction] Possible values include: 'Invalid', - * 'Rollback', 'Manual' - * @member {string} [healthCheckWaitDurationInMilliseconds] - * @member {string} [healthCheckStableDurationInMilliseconds] - * @member {string} [healthCheckRetryTimeoutInMilliseconds] - * @member {string} [upgradeTimeoutInMilliseconds] - * @member {string} [upgradeDomainTimeoutInMilliseconds] + * @member {string} rollingUpgradeMode The mode used to monitor health during + * a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and + * Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', + * 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' . + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {number} [replicaSetCheckTimeoutInMilliseconds] 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). + * @member {string} [failureAction] 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' + * @member {string} [healthCheckWaitDurationInMilliseconds] 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. + * @member {string} [healthCheckStableDurationInMilliseconds] 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. + * @member {string} [healthCheckRetryTimeoutInMilliseconds] 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. + * @member {string} [upgradeTimeoutInMilliseconds] 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. + * @member {string} [upgradeDomainTimeoutInMilliseconds] 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. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/safetyCheck.js b/lib/services/serviceFabric/lib/models/safetyCheck.js index 03c5b21328..0bed848453 100644 --- a/lib/services/serviceFabric/lib/models/safetyCheck.js +++ b/lib/services/serviceFabric/lib/models/safetyCheck.js @@ -46,6 +46,7 @@ class SafetyCheck { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/safetyCheckWrapper.js b/lib/services/serviceFabric/lib/models/safetyCheckWrapper.js index de3f38435f..5b319578a9 100644 --- a/lib/services/serviceFabric/lib/models/safetyCheckWrapper.js +++ b/lib/services/serviceFabric/lib/models/safetyCheckWrapper.js @@ -21,7 +21,9 @@ const models = require('./index'); class SafetyCheckWrapper { /** * Create a SafetyCheckWrapper. - * @member {object} [safetyCheck] + * @member {object} [safetyCheck] 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. * @member {string} [safetyCheck.kind] Polymorphic Discriminator */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/scalingMechanismDescription.js b/lib/services/serviceFabric/lib/models/scalingMechanismDescription.js new file mode 100644 index 0000000000..b626851d30 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/scalingMechanismDescription.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the mechanism for performing a scaling operation. + * + */ +class ScalingMechanismDescription { + /** + * Create a ScalingMechanismDescription. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ScalingMechanismDescription + * + * @returns {object} metadata of ScalingMechanismDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ScalingMechanismDescription', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingMechanismDescription', + className: 'ScalingMechanismDescription', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ScalingMechanismDescription; diff --git a/lib/services/serviceFabric/lib/models/scalingPolicyDescription.js b/lib/services/serviceFabric/lib/models/scalingPolicyDescription.js new file mode 100644 index 0000000000..e658a2d598 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/scalingPolicyDescription.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes how the scaling should be performed + * + */ +class ScalingPolicyDescription { + /** + * Create a ScalingPolicyDescription. + * @member {object} scalingTrigger Specifies the trigger associated with this + * scaling policy + * @member {string} [scalingTrigger.kind] Polymorphic Discriminator + * @member {object} scalingMechanism Specifies the mechanism associated with + * this scaling policy + * @member {string} [scalingMechanism.kind] Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ScalingPolicyDescription + * + * @returns {object} metadata of ScalingPolicyDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ScalingPolicyDescription', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription', + modelProperties: { + scalingTrigger: { + required: true, + serializedName: 'ScalingTrigger', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingTriggerDescription', + className: 'ScalingTriggerDescription' + } + }, + scalingMechanism: { + required: true, + serializedName: 'ScalingMechanism', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingMechanismDescription', + className: 'ScalingMechanismDescription' + } + } + } + } + }; + } +} + +module.exports = ScalingPolicyDescription; diff --git a/lib/services/serviceFabric/lib/models/scalingTriggerDescription.js b/lib/services/serviceFabric/lib/models/scalingTriggerDescription.js new file mode 100644 index 0000000000..933ace82bb --- /dev/null +++ b/lib/services/serviceFabric/lib/models/scalingTriggerDescription.js @@ -0,0 +1,58 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the trigger for performing a scaling operation. + * + */ +class ScalingTriggerDescription { + /** + * Create a ScalingTriggerDescription. + * @member {string} kind Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of ScalingTriggerDescription + * + * @returns {object} metadata of ScalingTriggerDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'ScalingTriggerDescription', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ScalingTriggerDescription', + className: 'ScalingTriggerDescription', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ScalingTriggerDescription; diff --git a/lib/services/serviceFabric/lib/models/secondaryActiveReplicatorStatus.js b/lib/services/serviceFabric/lib/models/secondaryActiveReplicatorStatus.js index a39a87b71a..6f71503886 100644 --- a/lib/services/serviceFabric/lib/models/secondaryActiveReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/secondaryActiveReplicatorStatus.js @@ -38,11 +38,17 @@ class SecondaryActiveReplicatorStatus extends models['SecondaryReplicatorStatus' serializedName: 'ActiveSecondary', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicatorStatus', className: 'SecondaryActiveReplicatorStatus', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/secondaryIdleReplicatorStatus.js b/lib/services/serviceFabric/lib/models/secondaryIdleReplicatorStatus.js index 95f47b5aed..674c72d3a6 100644 --- a/lib/services/serviceFabric/lib/models/secondaryIdleReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/secondaryIdleReplicatorStatus.js @@ -38,11 +38,17 @@ class SecondaryIdleReplicatorStatus extends models['SecondaryReplicatorStatus'] serializedName: 'IdleSecondary', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicatorStatus', className: 'SecondaryIdleReplicatorStatus', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/secondaryReplicatorStatus.js b/lib/services/serviceFabric/lib/models/secondaryReplicatorStatus.js index 40cb69f869..12d9f1af33 100644 --- a/lib/services/serviceFabric/lib/models/secondaryReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/secondaryReplicatorStatus.js @@ -13,13 +13,16 @@ const models = require('./index'); /** - * Class representing a SecondaryReplicatorStatus. + * Provides statistics about the Service Fabric Replicator, when it is + * functioning in a ActiveSecondary role. + * * @extends models['ReplicatorStatus'] */ class SecondaryReplicatorStatus extends models['ReplicatorStatus'] { /** * Create a SecondaryReplicatorStatus. - * @member {object} [replicationQueueStatus] + * @member {object} [replicationQueueStatus] Details about the replication + * queue on the secondary replicator. * @member {number} [replicationQueueStatus.queueUtilizationPercentage] * 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. @@ -52,7 +55,8 @@ class SecondaryReplicatorStatus extends models['ReplicatorStatus'] { * message was never received. * @member {boolean} [isInBuild] Value that indicates whether the replica is * currently being built. - * @member {object} [copyQueueStatus] + * @member {object} [copyQueueStatus] Details about the copy queue on the + * secondary replicator. * @member {number} [copyQueueStatus.queueUtilizationPercentage] 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. @@ -102,11 +106,17 @@ class SecondaryReplicatorStatus extends models['ReplicatorStatus'] { serializedName: 'SecondaryReplicatorStatus', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ReplicatorStatus', className: 'SecondaryReplicatorStatus', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/seedNodeSafetyCheck.js b/lib/services/serviceFabric/lib/models/seedNodeSafetyCheck.js index 09ee7169a4..4e219e3749 100644 --- a/lib/services/serviceFabric/lib/models/seedNodeSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/seedNodeSafetyCheck.js @@ -38,11 +38,17 @@ class SeedNodeSafetyCheck extends models['SafetyCheck'] { serializedName: 'EnsureSeedNodeQuorum', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'SeedNodeSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/selectedPartition.js b/lib/services/serviceFabric/lib/models/selectedPartition.js index 439195b0cf..aff230e5f5 100644 --- a/lib/services/serviceFabric/lib/models/selectedPartition.js +++ b/lib/services/serviceFabric/lib/models/selectedPartition.js @@ -18,8 +18,13 @@ class SelectedPartition { /** * Create a SelectedPartition. - * @member {string} [serviceName] - * @member {uuid} [partitionId] + * @member {string} [serviceName] The name of the service the partition + * belongs to. + * @member {uuid} [partitionId] An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/serviceBackupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/serviceBackupConfigurationInfo.js new file mode 100644 index 0000000000..5acd2905ae --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceBackupConfigurationInfo.js @@ -0,0 +1,94 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Backup configuration information for a specific Service Fabric service + * specifying what backup policy is being applied and suspend description, if + * any. + * + * @extends models['BackupConfigurationInfo'] + */ +class ServiceBackupConfigurationInfo extends models['BackupConfigurationInfo'] { + /** + * Create a ServiceBackupConfigurationInfo. + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceBackupConfigurationInfo + * + * @returns {object} metadata of ServiceBackupConfigurationInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Service', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'BackupConfigurationInfo', + className: 'ServiceBackupConfigurationInfo', + modelProperties: { + policyName: { + required: false, + serializedName: 'PolicyName', + type: { + name: 'String' + } + }, + policyInheritedFrom: { + required: false, + serializedName: 'PolicyInheritedFrom', + type: { + name: 'String' + } + }, + suspensionInfo: { + required: false, + serializedName: 'SuspensionInfo', + type: { + name: 'Composite', + className: 'BackupSuspensionInfo' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceName: { + required: false, + serializedName: 'ServiceName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceBackupConfigurationInfo; diff --git a/lib/services/serviceFabric/lib/models/serviceBackupEntity.js b/lib/services/serviceFabric/lib/models/serviceBackupEntity.js new file mode 100644 index 0000000000..c6e3ea8492 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceBackupEntity.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Identifies the Service Fabric stateful service which is being backed up. + * + * @extends models['BackupEntity'] + */ +class ServiceBackupEntity extends models['BackupEntity'] { + /** + * Create a ServiceBackupEntity. + * @member {string} [serviceName] The full name of the service with 'fabric:' + * URI scheme. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceBackupEntity + * + * @returns {object} metadata of ServiceBackupEntity + * + */ + mapper() { + return { + required: false, + serializedName: 'Service', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'EntityKind', + clientName: 'entityKind' + }, + uberParent: 'BackupEntity', + className: 'ServiceBackupEntity', + modelProperties: { + entityKind: { + required: true, + serializedName: 'EntityKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceName: { + required: false, + serializedName: 'ServiceName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceBackupEntity; diff --git a/lib/services/serviceFabric/lib/models/serviceCorrelationDescription.js b/lib/services/serviceFabric/lib/models/serviceCorrelationDescription.js index 8b408ff009..007b505183 100644 --- a/lib/services/serviceFabric/lib/models/serviceCorrelationDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceCorrelationDescription.js @@ -17,9 +17,12 @@ class ServiceCorrelationDescription { /** * Create a ServiceCorrelationDescription. - * @member {string} scheme Possible values include: 'Invalid', 'Affinity', + * @member {string} scheme The ServiceCorrelationScheme which describes the + * relationship between this service and the service specified via + * ServiceName. Possible values include: 'Invalid', 'Affinity', * 'AlignedAffinity', 'NonAlignedAffinity' - * @member {string} serviceName + * @member {string} serviceName The name of the service that the correlation + * relationship is established with. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js b/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js new file mode 100644 index 0000000000..9732914087 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceCreatedEvent.js @@ -0,0 +1,173 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Service Created event. + * + * @extends models['ServiceEvent'] + */ +class ServiceCreatedEvent extends models['ServiceEvent'] { + /** + * Create a ServiceCreatedEvent. + * @member {string} serviceTypeName Service type name. + * @member {string} applicationName Application name. + * @member {string} applicationTypeName Application type name. + * @member {number} serviceInstance Id of Service instance. + * @member {boolean} isStateful Indicates if Service is stateful. + * @member {number} partitionCount Number of partitions. + * @member {number} targetReplicaSetSize Size of target replicas set. + * @member {number} minReplicaSetSize Minimum size of replicas set. + * @member {string} servicePackageVersion Version of Service package. + * @member {uuid} partitionId An internal ID used by Service Fabric to + * uniquely identify a partition. This is a randomly generated GUID when the + * service was created. The partition ID is unique and does not change for + * the lifetime of the service. If the same service was deleted and recreated + * the IDs of its partitions would be different. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceCreatedEvent + * + * @returns {object} metadata of ServiceCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + }, + serviceTypeName: { + required: true, + serializedName: 'ServiceTypeName', + type: { + name: 'String' + } + }, + applicationName: { + required: true, + serializedName: 'ApplicationName', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + serviceInstance: { + required: true, + serializedName: 'ServiceInstance', + type: { + name: 'Number' + } + }, + isStateful: { + required: true, + serializedName: 'IsStateful', + type: { + name: 'Boolean' + } + }, + partitionCount: { + required: true, + serializedName: 'PartitionCount', + type: { + name: 'Number' + } + }, + targetReplicaSetSize: { + required: true, + serializedName: 'TargetReplicaSetSize', + type: { + name: 'Number' + } + }, + minReplicaSetSize: { + required: true, + serializedName: 'MinReplicaSetSize', + type: { + name: 'Number' + } + }, + servicePackageVersion: { + required: true, + serializedName: 'ServicePackageVersion', + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js b/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js new file mode 100644 index 0000000000..2905650e7a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceDeletedEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Service Deleted event. + * + * @extends models['ServiceEvent'] + */ +class ServiceDeletedEvent extends models['ServiceEvent'] { + /** + * Create a ServiceDeletedEvent. + * @member {string} serviceTypeName Service type name. + * @member {string} applicationName Application name. + * @member {string} applicationTypeName Application type name. + * @member {number} serviceInstance Id of Service instance. + * @member {boolean} isStateful Indicates if Service is stateful. + * @member {number} partitionCount Number of partitions. + * @member {number} targetReplicaSetSize Size of target replicas set. + * @member {number} minReplicaSetSize Minimum size of replicas set. + * @member {string} servicePackageVersion Version of Service package. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceDeletedEvent + * + * @returns {object} metadata of ServiceDeletedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceDeleted', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceDeletedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + }, + serviceTypeName: { + required: true, + serializedName: 'ServiceTypeName', + type: { + name: 'String' + } + }, + applicationName: { + required: true, + serializedName: 'ApplicationName', + type: { + name: 'String' + } + }, + applicationTypeName: { + required: true, + serializedName: 'ApplicationTypeName', + type: { + name: 'String' + } + }, + serviceInstance: { + required: true, + serializedName: 'ServiceInstance', + type: { + name: 'Number' + } + }, + isStateful: { + required: true, + serializedName: 'IsStateful', + type: { + name: 'Boolean' + } + }, + partitionCount: { + required: true, + serializedName: 'PartitionCount', + type: { + name: 'Number' + } + }, + targetReplicaSetSize: { + required: true, + serializedName: 'TargetReplicaSetSize', + type: { + name: 'Number' + } + }, + minReplicaSetSize: { + required: true, + serializedName: 'MinReplicaSetSize', + type: { + name: 'Number' + } + }, + servicePackageVersion: { + required: true, + serializedName: 'ServicePackageVersion', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceDeletedEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceDescription.js b/lib/services/serviceFabric/lib/models/serviceDescription.js index 68da78b456..6d90f3f890 100644 --- a/lib/services/serviceFabric/lib/models/serviceDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceDescription.js @@ -20,11 +20,17 @@ const models = require('./index'); class ServiceDescription { /** * Create a ServiceDescription. - * @member {string} [applicationName] - * @member {string} serviceName - * @member {string} serviceTypeName - * @member {array} [initializationData] - * @member {object} partitionDescription + * @member {string} [applicationName] The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} serviceName The full name of the service with 'fabric:' + * URI scheme. + * @member {string} serviceTypeName Name of the service type as specified in + * the service manifest. + * @member {array} [initializationData] The initialization data as an array + * of bytes. Initialization data is passed to service instances or replicas + * when they are created. + * @member {object} partitionDescription The partition description as an + * object. * @member {string} [partitionDescription.partitionScheme] Polymorphic * Discriminator * @member {string} [placementConstraints] The placement constraints as a @@ -32,17 +38,19 @@ class ServiceDescription { * 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)". - * @member {array} [correlationScheme] - * @member {array} [serviceLoadMetrics] - * @member {array} [servicePlacementPolicies] - * @member {string} [defaultMoveCost] Possible values include: 'Zero', 'Low', - * 'Medium', 'High' + * @member {array} [correlationScheme] The correlation scheme. + * @member {array} [serviceLoadMetrics] The service load metrics. + * @member {array} [servicePlacementPolicies] The service placement policies. + * @member {string} [defaultMoveCost] The move cost for the service. Possible + * values include: 'Zero', 'Low', 'Medium', 'High' * @member {boolean} [isDefaultMoveCostSpecified] Indicates if the * DefaultMoveCost property is specified. - * @member {string} [servicePackageActivationMode] Possible values include: + * @member {string} [servicePackageActivationMode] The activation mode of + * service package to be used for a service. Possible values include: * 'SharedProcess', 'ExclusiveProcess' * @member {string} [serviceDnsName] The DNS name of the service. It requires * the DNS system service to be enabled in Service Fabric cluster. + * @member {array} [scalingPolicies] Scaling policies for this service. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -200,9 +208,25 @@ class ServiceDescription { name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceEvent.js b/lib/services/serviceFabric/lib/models/serviceEvent.js new file mode 100644 index 0000000000..152011cc49 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceEvent.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Represents the base for all Service Events. + * + * @extends models['FabricEvent'] + */ +class ServiceEvent extends models['FabricEvent'] { + /** + * Create a ServiceEvent. + * @member {string} serviceId The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceEvent + * + * @returns {object} metadata of ServiceEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceEvent', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js b/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js index 4253182be0..eddc2ea2f1 100644 --- a/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js @@ -19,11 +19,16 @@ class ServiceFromTemplateDescription { /** * Create a ServiceFromTemplateDescription. - * @member {string} applicationName - * @member {string} serviceName - * @member {string} serviceTypeName - * @member {array} [initializationData] - * @member {string} [servicePackageActivationMode] Possible values include: + * @member {string} applicationName The name of the application, including + * the 'fabric:' URI scheme. + * @member {string} serviceName The full name of the service with 'fabric:' + * URI scheme. + * @member {string} serviceTypeName Name of the service type as specified in + * the service manifest. + * @member {array} [initializationData] The initialization data for the newly + * created service instance. + * @member {string} [servicePackageActivationMode] The activation mode of + * service package to be used for a service. Possible values include: * 'SharedProcess', 'ExclusiveProcess' * @member {string} [serviceDnsName] The DNS name of the service. It requires * the DNS system service to be enabled in Service Fabric cluster. diff --git a/lib/services/serviceFabric/lib/models/serviceHealth.js b/lib/services/serviceFabric/lib/models/serviceHealth.js index 6d3d97efc7..7ec9e41e3c 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealth.js +++ b/lib/services/serviceFabric/lib/models/serviceHealth.js @@ -20,7 +20,8 @@ const models = require('./index'); class ServiceHealth extends models['EntityHealth'] { /** * Create a ServiceHealth. - * @member {string} [name] + * @member {string} [name] The name of the service whose health information + * is described by this object. * @member {array} [partitionHealthStates] The list of partition health * states associated with the service. */ diff --git a/lib/services/serviceFabric/lib/models/serviceHealthEvaluation.js b/lib/services/serviceFabric/lib/models/serviceHealthEvaluation.js index 672e842914..770e61dff6 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthEvaluation.js @@ -23,8 +23,12 @@ const models = require('./index'); class ServiceHealthEvaluation extends models['HealthEvaluation'] { /** * Create a ServiceHealthEvaluation. - * @member {string} [serviceName] - * @member {array} [unhealthyEvaluations] + * @member {string} [serviceName] Name of the service whose health evaluation + * is described by this object. + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -42,6 +46,11 @@ class ServiceHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Service', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ServiceHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -61,6 +70,7 @@ class ServiceHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/serviceHealthReportCreatedEvent.js new file mode 100644 index 0000000000..5347fb666c --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceHealthReportCreatedEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Service Health Report Created event. + * + * @extends models['ServiceEvent'] + */ +class ServiceHealthReportCreatedEvent extends models['ServiceEvent'] { + /** + * Create a ServiceHealthReportCreatedEvent. + * @member {number} instanceId Id of Service instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceHealthReportCreatedEvent + * + * @returns {object} metadata of ServiceHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + }, + instanceId: { + required: true, + serializedName: 'InstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ServiceHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js new file mode 100644 index 0000000000..469953a18a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/serviceHealthReportExpiredEvent.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Service Health Report Expired event. + * + * @extends models['ServiceEvent'] + */ +class ServiceHealthReportExpiredEvent extends models['ServiceEvent'] { + /** + * Create a ServiceHealthReportExpiredEvent. + * @member {number} instanceId Id of Service instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceHealthReportExpiredEvent + * + * @returns {object} metadata of ServiceHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + serviceId: { + required: true, + serializedName: 'ServiceId', + type: { + name: 'String' + } + }, + instanceId: { + required: true, + serializedName: 'InstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ServiceHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/serviceHealthState.js b/lib/services/serviceFabric/lib/models/serviceHealthState.js index effe86efd2..1e1ac6ac88 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthState.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthState.js @@ -21,7 +21,8 @@ const models = require('./index'); class ServiceHealthState extends models['EntityHealthState'] { /** * Create a ServiceHealthState. - * @member {string} [serviceName] + * @member {string} [serviceName] Name of the service whose health state is + * represented by this object. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js b/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js index 54a3d5df3b..8004eb4cb2 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js @@ -23,8 +23,11 @@ const models = require('./index'); class ServiceHealthStateChunk extends models['EntityHealthStateChunk'] { /** * Create a ServiceHealthStateChunk. - * @member {string} [serviceName] - * @member {object} [partitionHealthStateChunks] + * @member {string} [serviceName] The name of the service whose health state + * chunk is provided in this object. + * @member {object} [partitionHealthStateChunks] The list of partition health + * state chunks belonging to the service that respect the filters in the + * cluster health chunk query description. * @member {array} [partitionHealthStateChunks.items] The list of partition * health state chunks that respect the input filters in the chunk query. */ diff --git a/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js b/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js index d63cc36cd3..fdda27e281 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js @@ -71,7 +71,7 @@ class ServiceHealthStateFilter { * 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. + * its partition ID. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/serviceInfo.js b/lib/services/serviceFabric/lib/models/serviceInfo.js index 62c159c9ef..24e81ce0df 100644 --- a/lib/services/serviceFabric/lib/models/serviceInfo.js +++ b/lib/services/serviceFabric/lib/models/serviceInfo.js @@ -17,14 +17,24 @@ class ServiceInfo { /** * Create a ServiceInfo. - * @member {string} [id] - * @member {string} [name] - * @member {string} [typeName] + * @member {string} [id] The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + * @member {string} [name] The full name of the service with 'fabric:' URI + * scheme. + * @member {string} [typeName] Name of the service type as specified in the + * service manifest. * @member {string} [manifestVersion] The version of the service manifest. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [serviceStatus] Possible values include: 'Unknown', - * 'Active', 'Upgrading', 'Deleting', 'Creating', 'Failed' + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [serviceStatus] The status of the application. Possible + * values include: 'Unknown', 'Active', 'Upgrading', 'Deleting', 'Creating', + * 'Failed' * @member {boolean} [isServiceGroup] Whether the service is in a service * group. * @member {string} serviceKind Polymorphic Discriminator @@ -103,6 +113,7 @@ class ServiceInfo { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceLoadMetricDescription.js b/lib/services/serviceFabric/lib/models/serviceLoadMetricDescription.js index 2c561a1273..71ec3a7f97 100644 --- a/lib/services/serviceFabric/lib/models/serviceLoadMetricDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceLoadMetricDescription.js @@ -21,8 +21,9 @@ class ServiceLoadMetricDescription { * 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. - * @member {string} [weight] Possible values include: 'Zero', 'Low', - * 'Medium', 'High' + * @member {string} [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' * @member {number} [primaryDefaultLoad] 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. diff --git a/lib/services/serviceFabric/lib/models/serviceNameInfo.js b/lib/services/serviceFabric/lib/models/serviceNameInfo.js index 0c48575f86..e8ed64ba85 100644 --- a/lib/services/serviceFabric/lib/models/serviceNameInfo.js +++ b/lib/services/serviceFabric/lib/models/serviceNameInfo.js @@ -17,8 +17,15 @@ class ServiceNameInfo { /** * Create a ServiceNameInfo. - * @member {string} [id] - * @member {string} [name] + * @member {string} [id] The identity of the service. This is an encoded + * representation of the service name. This is used in the REST APIs to + * identify the service resource. + * 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. + * @member {string} [name] The full name of the service with 'fabric:' URI + * scheme. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/servicePartitionInfo.js b/lib/services/serviceFabric/lib/models/servicePartitionInfo.js index c2ca2b1765..cc573a2d5f 100644 --- a/lib/services/serviceFabric/lib/models/servicePartitionInfo.js +++ b/lib/services/serviceFabric/lib/models/servicePartitionInfo.js @@ -19,12 +19,19 @@ const models = require('./index'); class ServicePartitionInfo { /** * Create a ServicePartitionInfo. - * @member {string} [healthState] Possible values include: 'Invalid', 'Ok', - * 'Warning', 'Error', 'Unknown' - * @member {string} [partitionStatus] Possible values include: 'Invalid', - * 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting' - * @member {object} [partitionInformation] - * @member {uuid} [partitionInformation.id] + * @member {string} [healthState] The health state of a Service Fabric entity + * such as Cluster, Node, Application, Service, Partition, Replica etc. + * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @member {string} [partitionStatus] The status of the service fabric + * service partition. Possible values include: 'Invalid', 'Ready', + * 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting' + * @member {object} [partitionInformation] Information about the partition + * identity, partitioning scheme and keys supported by it. + * @member {uuid} [partitionInformation.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. * @member {string} [partitionInformation.servicePartitionKind] Polymorphic * Discriminator * @member {string} serviceKind Polymorphic Discriminator @@ -81,6 +88,7 @@ class ServicePartitionInfo { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementInvalidDomainPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementInvalidDomainPolicyDescription.js index d3b3d3f5f6..f24b4ce43b 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementInvalidDomainPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementInvalidDomainPolicyDescription.js @@ -41,11 +41,17 @@ class ServicePlacementInvalidDomainPolicyDescription extends models['ServicePlac serializedName: 'InvalidDomain', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Type', + clientName: 'type' + }, + uberParent: 'ServicePlacementPolicyDescription', className: 'ServicePlacementInvalidDomainPolicyDescription', modelProperties: { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js index 401c83359a..29cb121710 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js @@ -40,11 +40,17 @@ class ServicePlacementNonPartiallyPlaceServicePolicyDescription extends models[' serializedName: 'NonPartiallyPlaceService', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Type', + clientName: 'type' + }, + uberParent: 'ServicePlacementPolicyDescription', className: 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', modelProperties: { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementPolicyDescription.js index f4fba2ebeb..9ba27f8952 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementPolicyDescription.js @@ -44,6 +44,7 @@ class ServicePlacementPolicyDescription { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js index 60a5d5e65d..4c46a02441 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js @@ -19,7 +19,7 @@ const models = require('./index'); * * 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 + * 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 @@ -47,14 +47,20 @@ class ServicePlacementPreferPrimaryDomainPolicyDescription extends models['Servi mapper() { return { required: false, - serializedName: 'PreferPrimaryDomain', + serializedName: 'PreferredPrimaryDomain', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Type', + clientName: 'type' + }, + uberParent: 'ServicePlacementPolicyDescription', className: 'ServicePlacementPreferPrimaryDomainPolicyDescription', modelProperties: { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js index 83207e2aed..fd364e8ecc 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js @@ -48,14 +48,20 @@ class ServicePlacementRequireDomainDistributionPolicyDescription extends models[ mapper() { return { required: false, - serializedName: 'RequireDomainDistribution', + serializedName: 'RequiredDomainDistribution', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Type', + clientName: 'type' + }, + uberParent: 'ServicePlacementPolicyDescription', className: 'ServicePlacementRequireDomainDistributionPolicyDescription', modelProperties: { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicePlacementRequiredDomainPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementRequiredDomainPolicyDescription.js index bd83d6007c..2231ac5048 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementRequiredDomainPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementRequiredDomainPolicyDescription.js @@ -38,14 +38,20 @@ class ServicePlacementRequiredDomainPolicyDescription extends models['ServicePla mapper() { return { required: false, - serializedName: 'RequireDomain', + serializedName: 'RequiredDomain', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Type', + clientName: 'type' + }, + uberParent: 'ServicePlacementPolicyDescription', className: 'ServicePlacementRequiredDomainPolicyDescription', modelProperties: { type: { required: true, serializedName: 'Type', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceTypeDescription.js b/lib/services/serviceFabric/lib/models/serviceTypeDescription.js index ca8b02bc13..215279f9a6 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeDescription.js @@ -14,8 +14,7 @@ const models = require('./index'); /** * Describes a service type defined in the service manifest of a provisioned - * application type. The properties the the ones defined in the service - * manifest. + * application type. The properties the ones defined in the service manifest. * */ class ServiceTypeDescription { @@ -24,11 +23,13 @@ class ServiceTypeDescription { * @member {boolean} [isStateful] 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. - * @member {string} [serviceTypeName] + * @member {string} [serviceTypeName] Name of the service type as specified + * in the service manifest. * @member {string} [placementConstraints] The placement constraint to be * used when instantiating this service in a Service Fabric cluster. - * @member {array} [servicePlacementPolicies] - * @member {array} [extensions] + * @member {array} [servicePlacementPolicies] List of service placement + * policy descriptions. + * @member {array} [extensions] List of service type extensions. * @member {string} kind Polymorphic Discriminator */ constructor() { @@ -112,6 +113,7 @@ class ServiceTypeDescription { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js index eb750c74f5..c4093f7ea5 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js @@ -22,7 +22,8 @@ class ServiceTypeHealthPolicyMapItem { * Create a ServiceTypeHealthPolicyMapItem. * @member {string} key The key of the service type health policy map item. * This is the name of the service type. - * @member {object} value + * @member {object} value The value of the service type health policy map + * item. This is the ServiceTypeHealthPolicy for this service type. * @member {number} [value.maxPercentUnhealthyPartitionsPerService] The * maximum allowed percentage of unhealthy partitions per service. Allowed * values are Byte values from zero to 100 diff --git a/lib/services/serviceFabric/lib/models/serviceTypeInfo.js b/lib/services/serviceFabric/lib/models/serviceTypeInfo.js index 65573ed30e..8d2e0b719f 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeInfo.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeInfo.js @@ -20,19 +20,25 @@ const models = require('./index'); class ServiceTypeInfo { /** * Create a ServiceTypeInfo. - * @member {object} [serviceTypeDescription] + * @member {object} [serviceTypeDescription] Describes a service type defined + * in the service manifest of a provisioned application type. The properties + * the ones defined in the service manifest. * @member {boolean} [serviceTypeDescription.isStateful] 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. - * @member {string} [serviceTypeDescription.serviceTypeName] + * @member {string} [serviceTypeDescription.serviceTypeName] Name of the + * service type as specified in the service manifest. * @member {string} [serviceTypeDescription.placementConstraints] The * placement constraint to be used when instantiating this service in a * Service Fabric cluster. - * @member {array} [serviceTypeDescription.servicePlacementPolicies] - * @member {array} [serviceTypeDescription.extensions] + * @member {array} [serviceTypeDescription.servicePlacementPolicies] List of + * service placement policy descriptions. + * @member {array} [serviceTypeDescription.extensions] List of service type + * extensions. * @member {string} [serviceTypeDescription.kind] Polymorphic Discriminator - * @member {string} [serviceManifestName] + * @member {string} [serviceManifestName] The name of the service manifest in + * which this service type is defined. * @member {string} [serviceManifestVersion] The version of the service * manifest in which this service type is defined. * @member {boolean} [isServiceGroup] Indicates whether the service is a diff --git a/lib/services/serviceFabric/lib/models/serviceUpdateDescription.js b/lib/services/serviceFabric/lib/models/serviceUpdateDescription.js index 337c081a16..b661e8e694 100644 --- a/lib/services/serviceFabric/lib/models/serviceUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceUpdateDescription.js @@ -51,16 +51,19 @@ class ServiceUpdateDescription { * 256. * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The * value is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. * @member {string} [placementConstraints] 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)". - * @member {array} [correlationScheme] - * @member {array} [loadMetrics] - * @member {array} [servicePlacementPolicies] - * @member {string} [defaultMoveCost] Possible values include: 'Zero', 'Low', - * 'Medium', 'High' + * @member {array} [correlationScheme] The correlation scheme. + * @member {array} [loadMetrics] The service load metrics. + * @member {array} [servicePlacementPolicies] The service placement policies. + * @member {string} [defaultMoveCost] The move cost for the service. Possible + * values include: 'Zero', 'Low', 'Medium', 'High' + * @member {array} [scalingPolicies] Scaling policies for this service. * @member {string} serviceKind Polymorphic Discriminator */ constructor() { @@ -156,9 +159,25 @@ class ServiceUpdateDescription { name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/servicesHealthEvaluation.js b/lib/services/serviceFabric/lib/models/servicesHealthEvaluation.js index a5ba50c817..e4fb653537 100644 --- a/lib/services/serviceFabric/lib/models/servicesHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/servicesHealthEvaluation.js @@ -30,7 +30,9 @@ class ServicesHealthEvaluation extends models['HealthEvaluation'] { * of unhealthy services from the ServiceTypeHealthPolicy. * @member {number} [totalCount] Total number of services of the current * service type in the application from the health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * ServiceHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -48,6 +50,11 @@ class ServicesHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'Services', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'ServicesHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -67,6 +74,7 @@ class ServicesHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/singletonPartitionInformation.js b/lib/services/serviceFabric/lib/models/singletonPartitionInformation.js index 26ad6662b0..a82a990aaf 100644 --- a/lib/services/serviceFabric/lib/models/singletonPartitionInformation.js +++ b/lib/services/serviceFabric/lib/models/singletonPartitionInformation.js @@ -13,9 +13,9 @@ const models = require('./index'); /** - * Information about a partition that is singleton. The services with - * singletone partitioning scheme are effectively non-partitioned. They only - * have one partition. + * Information about a partition that is singleton. The services with singleton + * partitioning scheme are effectively non-partitioned. They only have one + * partition. * * @extends models['PartitionInformation'] */ @@ -39,6 +39,11 @@ class SingletonPartitionInformation extends models['PartitionInformation'] { serializedName: 'Singleton', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServicePartitionKind', + clientName: 'servicePartitionKind' + }, + uberParent: 'PartitionInformation', className: 'SingletonPartitionInformation', modelProperties: { id: { @@ -51,6 +56,7 @@ class SingletonPartitionInformation extends models['PartitionInformation'] { servicePartitionKind: { required: true, serializedName: 'ServicePartitionKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/singletonPartitionSchemeDescription.js b/lib/services/serviceFabric/lib/models/singletonPartitionSchemeDescription.js index fe7bf2ef28..0a78a78081 100644 --- a/lib/services/serviceFabric/lib/models/singletonPartitionSchemeDescription.js +++ b/lib/services/serviceFabric/lib/models/singletonPartitionSchemeDescription.js @@ -38,11 +38,17 @@ class SingletonPartitionSchemeDescription extends models['PartitionSchemeDescrip serializedName: 'Singleton', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'PartitionScheme', + clientName: 'partitionScheme' + }, + uberParent: 'PartitionSchemeDescription', className: 'SingletonPartitionSchemeDescription', modelProperties: { partitionScheme: { required: true, serializedName: 'PartitionScheme', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js b/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js index c8ee891a77..f77846a6d3 100644 --- a/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js @@ -21,23 +21,63 @@ class StartClusterUpgradeDescription { * Create a StartClusterUpgradeDescription. * @member {string} [codeVersion] The cluster code version. * @member {string} [configVersion] The cluster configuration version. - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling'. Default value: 'Rolling' . - * @member {string} [rollingUpgradeMode] Possible values include: 'Invalid', + * @member {string} [upgradeKind] The kind of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling'. Default + * value: 'Rolling' . + * @member {string} [rollingUpgradeMode] The mode used to monitor health + * during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: * 'UnmonitoredAuto' . - * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] - * @member {boolean} [forceRestart] - * @member {object} [monitoringPolicy] - * @member {string} [monitoringPolicy.failureAction] Possible values include: - * 'Invalid', 'Rollback', 'Manual' + * @member {number} [upgradeReplicaSetCheckTimeoutInSeconds] 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). + * @member {boolean} [forceRestart] If true, then processes are forcefully + * restarted during upgrade even when the code version has not changed (the + * upgrade only changes configuration or data). + * @member {object} [monitoringPolicy] Describes the parameters for + * monitoring an upgrade in Monitored mode. + * @member {string} [monitoringPolicy.failureAction] 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' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [monitoringPolicy.healthCheckStableDurationInMilliseconds] + * [monitoringPolicy.healthCheckStableDurationInMilliseconds] 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. * @member {string} [monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] - * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {string} [monitoringPolicy.upgradeTimeoutInMilliseconds] 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. + * @member {string} [monitoringPolicy.upgradeDomainTimeoutInMilliseconds] 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -72,10 +112,34 @@ class StartClusterUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta * health evaluation rather than absolute health evaluation after completion * of each upgrade domain. - * @member {object} [clusterUpgradeHealthPolicy] + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} * [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] The maximum * allowed percentage of nodes health degradation allowed during cluster @@ -93,8 +157,12 @@ class StartClusterUpgradeDescription { * 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%. - * @member {object} [applicationHealthPolicyMap] + * @member {object} [applicationHealthPolicyMap] Defines the application + * health policy map used to evaluate the health of an application or one of + * its children entities. * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/startedChaosEvent.js b/lib/services/serviceFabric/lib/models/startedChaosEvent.js index 4db567c20e..211598a2df 100644 --- a/lib/services/serviceFabric/lib/models/startedChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/startedChaosEvent.js @@ -20,7 +20,8 @@ const models = require('./index'); class StartedChaosEvent extends models['ChaosEvent'] { /** * Create a StartedChaosEvent. - * @member {object} [chaosParameters] + * @member {object} [chaosParameters] Defines all the parameters to configure + * a Chaos run. * @member {string} [chaosParameters.timeToRunInSeconds] Total time (in * seconds) for which Chaos will run before automatically stopping. The * maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). @@ -50,7 +51,12 @@ class StartedChaosEvent extends models['ChaosEvent'] { * @member {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. - * @member {object} [chaosParameters.clusterHealthPolicy] + * @member {object} [chaosParameters.clusterHealthPolicy] 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. * @member {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -88,8 +94,77 @@ class StartedChaosEvent extends models['ChaosEvent'] { * applications. Default percentage is zero. * @member {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {object} [chaosParameters.context] - * @member {object} [chaosParameters.context.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. + * @member {object} [chaosParameters.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. + * @member {object} [chaosParameters.context.map] Describes a map that + * contains a collection of ChaosContextMapItem's. + * @member {object} [chaosParameters.chaosTargetFilter] 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. + * @member {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] + * 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 nodetype (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. + * @member {array} + * [chaosParameters.chaosTargetFilter.applicationInclusionList] A list of + * application URI's 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. */ constructor() { super(); @@ -107,6 +182,11 @@ class StartedChaosEvent extends models['ChaosEvent'] { serializedName: 'Started', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'StartedChaosEvent', modelProperties: { timeStampUtc: { @@ -119,6 +199,7 @@ class StartedChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js new file mode 100644 index 0000000000..4364973a9e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js @@ -0,0 +1,168 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateful Replica Health Report Created event. + * + * @extends models['ReplicaEvent'] + */ +class StatefulReplicaHealthReportCreatedEvent extends models['ReplicaEvent'] { + /** + * Create a StatefulReplicaHealthReportCreatedEvent. + * @member {number} replicaInstanceId Id of Replica instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatefulReplicaHealthReportCreatedEvent + * + * @returns {object} metadata of StatefulReplicaHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatefulReplicaHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatefulReplicaHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + replicaInstanceId: { + required: true, + serializedName: 'ReplicaInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatefulReplicaHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js new file mode 100644 index 0000000000..e7800a339a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js @@ -0,0 +1,168 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateful Replica Health Report Expired event. + * + * @extends models['ReplicaEvent'] + */ +class StatefulReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { + /** + * Create a StatefulReplicaHealthReportExpiredEvent. + * @member {number} replicaInstanceId Id of Replica instance. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatefulReplicaHealthReportExpiredEvent + * + * @returns {object} metadata of StatefulReplicaHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatefulReplicaHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatefulReplicaHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + replicaInstanceId: { + required: true, + serializedName: 'ReplicaInstanceId', + type: { + name: 'Number' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatefulReplicaHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/statefulServiceDescription.js b/lib/services/serviceFabric/lib/models/statefulServiceDescription.js index 74ecc7c3bd..145d04182f 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceDescription.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceDescription.js @@ -67,6 +67,11 @@ class StatefulServiceDescription extends models['ServiceDescription'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceDescription', className: 'StatefulServiceDescription', modelProperties: { applicationName: { @@ -202,9 +207,25 @@ class StatefulServiceDescription extends models['ServiceDescription'] { name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceInfo.js b/lib/services/serviceFabric/lib/models/statefulServiceInfo.js index 0fc3f12655..d401e974f7 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceInfo.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceInfo.js @@ -39,6 +39,11 @@ class StatefulServiceInfo extends models['ServiceInfo'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceInfo', className: 'StatefulServiceInfo', modelProperties: { id: { @@ -93,6 +98,7 @@ class StatefulServiceInfo extends models['ServiceInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js b/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js index 00ae32b202..90938bc300 100644 --- a/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js +++ b/lib/services/serviceFabric/lib/models/statefulServicePartitionInfo.js @@ -28,7 +28,11 @@ class StatefulServicePartitionInfo extends models['ServicePartitionInfo'] { * 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. - * @member {object} [currentConfigurationEpoch] + * @member {object} [currentConfigurationEpoch] 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. * @member {string} [currentConfigurationEpoch.configurationVersion] The * current configuration number of this Epoch. The configuration number is an * increasing value that is updated whenever the configuration of this @@ -55,6 +59,11 @@ class StatefulServicePartitionInfo extends models['ServicePartitionInfo'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServicePartitionInfo', className: 'StatefulServicePartitionInfo', modelProperties: { healthState: { @@ -87,6 +96,7 @@ class StatefulServicePartitionInfo extends models['ServicePartitionInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js index 9b83415194..d76750141b 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js @@ -23,7 +23,13 @@ const models = require('./index'); class StatefulServiceReplicaHealth extends models['ReplicaHealth'] { /** * Create a StatefulServiceReplicaHealth. - * @member {string} [replicaId] + * @member {string} [replicaId] 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. */ constructor() { super(); @@ -41,6 +47,11 @@ class StatefulServiceReplicaHealth extends models['ReplicaHealth'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'EntityHealth', className: 'StatefulServiceReplicaHealth', modelProperties: { aggregatedHealthState: { @@ -98,6 +109,7 @@ class StatefulServiceReplicaHealth extends models['ReplicaHealth'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealthState.js b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealthState.js index 73d1bd29c7..aa27b4af1e 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealthState.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealthState.js @@ -14,14 +14,20 @@ const models = require('./index'); /** * Represents the health state of the stateful service replica, which contains - * the replica id and the aggregated health state. + * the replica ID and the aggregated health state. * * @extends models['ReplicaHealthState'] */ class StatefulServiceReplicaHealthState extends models['ReplicaHealthState'] { /** * Create a StatefulServiceReplicaHealthState. - * @member {string} [replicaId] + * @member {string} [replicaId] 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. */ constructor() { super(); @@ -39,6 +45,11 @@ class StatefulServiceReplicaHealthState extends models['ReplicaHealthState'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'EntityHealthState', className: 'StatefulServiceReplicaHealthState', modelProperties: { aggregatedHealthState: { @@ -58,6 +69,7 @@ class StatefulServiceReplicaHealthState extends models['ReplicaHealthState'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceReplicaInfo.js b/lib/services/serviceFabric/lib/models/statefulServiceReplicaInfo.js index 484ce9381e..2b09d5f3cf 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceReplicaInfo.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceReplicaInfo.js @@ -22,9 +22,16 @@ const models = require('./index'); class StatefulServiceReplicaInfo extends models['ReplicaInfo'] { /** * Create a StatefulServiceReplicaInfo. - * @member {string} [replicaRole] Possible values include: 'Unknown', 'None', - * 'Primary', 'IdleSecondary', 'ActiveSecondary' - * @member {string} [replicaId] + * @member {string} [replicaRole] The role of a replica of a stateful + * service. Possible values include: 'Unknown', 'None', 'Primary', + * 'IdleSecondary', 'ActiveSecondary' + * @member {string} [replicaId] 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. */ constructor() { super(); @@ -42,6 +49,11 @@ class StatefulServiceReplicaInfo extends models['ReplicaInfo'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ReplicaInfo', className: 'StatefulServiceReplicaInfo', modelProperties: { replicaStatus: { @@ -82,6 +94,7 @@ class StatefulServiceReplicaInfo extends models['ReplicaInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js b/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js index 344ceb7ee9..3ce3ba9741 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js @@ -41,6 +41,11 @@ class StatefulServiceTypeDescription extends models['ServiceTypeDescription'] { serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ServiceTypeDescription', className: 'StatefulServiceTypeDescription', modelProperties: { isStateful: { @@ -102,6 +107,7 @@ class StatefulServiceTypeDescription extends models['ServiceTypeDescription'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statefulServiceUpdateDescription.js b/lib/services/serviceFabric/lib/models/statefulServiceUpdateDescription.js index 8fff473ae9..df7c70df5c 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceUpdateDescription.js @@ -48,6 +48,11 @@ class StatefulServiceUpdateDescription extends models['ServiceUpdateDescription' serializedName: 'Stateful', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceUpdateDescription', className: 'StatefulServiceUpdateDescription', modelProperties: { flags: { @@ -121,9 +126,25 @@ class StatefulServiceUpdateDescription extends models['ServiceUpdateDescription' name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js new file mode 100644 index 0000000000..55de8b43d9 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateless Replica Health Report Created event. + * + * @extends models['ReplicaEvent'] + */ +class StatelessReplicaHealthReportCreatedEvent extends models['ReplicaEvent'] { + /** + * Create a StatelessReplicaHealthReportCreatedEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatelessReplicaHealthReportCreatedEvent + * + * @returns {object} metadata of StatelessReplicaHealthReportCreatedEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatelessReplicaHealthReportCreated', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatelessReplicaHealthReportCreatedEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatelessReplicaHealthReportCreatedEvent; diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js new file mode 100644 index 0000000000..27990ae1ee --- /dev/null +++ b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js @@ -0,0 +1,160 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Stateless Replica Health Report Expired event. + * + * @extends models['ReplicaEvent'] + */ +class StatelessReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { + /** + * Create a StatelessReplicaHealthReportExpiredEvent. + * @member {string} sourceId Id of report source. + * @member {string} property Describes the property. + * @member {string} healthState Describes the property health state. + * @member {number} timeToLiveMs Time to live in milli-seconds. + * @member {number} sequenceNumber Sequence number of report. + * @member {string} description Description of report. + * @member {boolean} removeWhenExpired Indicates the removal when it expires. + * @member {date} sourceUtcTimestamp Source time. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StatelessReplicaHealthReportExpiredEvent + * + * @returns {object} metadata of StatelessReplicaHealthReportExpiredEvent + * + */ + mapper() { + return { + required: false, + serializedName: 'StatelessReplicaHealthReportExpired', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'StatelessReplicaHealthReportExpiredEvent', + modelProperties: { + eventInstanceId: { + required: true, + serializedName: 'EventInstanceId', + type: { + name: 'String' + } + }, + timeStamp: { + required: true, + serializedName: 'TimeStamp', + type: { + name: 'DateTime' + } + }, + hasCorrelatedEvents: { + required: false, + serializedName: 'HasCorrelatedEvents', + type: { + name: 'Boolean' + } + }, + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + partitionId: { + required: true, + serializedName: 'PartitionId', + type: { + name: 'String' + } + }, + replicaId: { + required: true, + serializedName: 'ReplicaId', + type: { + name: 'String' + } + }, + sourceId: { + required: true, + serializedName: 'SourceId', + type: { + name: 'String' + } + }, + property: { + required: true, + serializedName: 'Property', + type: { + name: 'String' + } + }, + healthState: { + required: true, + serializedName: 'HealthState', + type: { + name: 'String' + } + }, + timeToLiveMs: { + required: true, + serializedName: 'TimeToLiveMs', + type: { + name: 'Number' + } + }, + sequenceNumber: { + required: true, + serializedName: 'SequenceNumber', + type: { + name: 'Number' + } + }, + description: { + required: true, + serializedName: 'Description', + type: { + name: 'String' + } + }, + removeWhenExpired: { + required: true, + serializedName: 'RemoveWhenExpired', + type: { + name: 'Boolean' + } + }, + sourceUtcTimestamp: { + required: true, + serializedName: 'SourceUtcTimestamp', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = StatelessReplicaHealthReportExpiredEvent; diff --git a/lib/services/serviceFabric/lib/models/statelessServiceDescription.js b/lib/services/serviceFabric/lib/models/statelessServiceDescription.js index d19c102376..896acf7119 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceDescription.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceDescription.js @@ -38,6 +38,11 @@ class StatelessServiceDescription extends models['ServiceDescription'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceDescription', className: 'StatelessServiceDescription', modelProperties: { applicationName: { @@ -173,9 +178,25 @@ class StatelessServiceDescription extends models['ServiceDescription'] { name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceInfo.js b/lib/services/serviceFabric/lib/models/statelessServiceInfo.js index fb3ee7dba9..33d5bb6429 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceInfo.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceInfo.js @@ -37,6 +37,11 @@ class StatelessServiceInfo extends models['ServiceInfo'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceInfo', className: 'StatelessServiceInfo', modelProperties: { id: { @@ -91,6 +96,7 @@ class StatelessServiceInfo extends models['ServiceInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js index 1ad1eba3db..7d390cab42 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Represents the health of the statelss service instance. + * Represents the health of the stateless service instance. * Contains the instance aggregated health state, the health events and the * unhealthy evaluations. * @@ -23,7 +23,12 @@ const models = require('./index'); class StatelessServiceInstanceHealth extends models['ReplicaHealth'] { /** * Create a StatelessServiceInstanceHealth. - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ constructor() { super(); @@ -41,6 +46,11 @@ class StatelessServiceInstanceHealth extends models['ReplicaHealth'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'EntityHealth', className: 'StatelessServiceInstanceHealth', modelProperties: { aggregatedHealthState: { @@ -98,6 +108,7 @@ class StatelessServiceInstanceHealth extends models['ReplicaHealth'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealthState.js b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealthState.js index 6e962cf108..70bc066e97 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealthState.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealthState.js @@ -14,14 +14,15 @@ const models = require('./index'); /** * Represents the health state of the stateless service instance, which - * contains the instance id and the aggregated health state. + * contains the instance ID and the aggregated health state. * * @extends models['ReplicaHealthState'] */ class StatelessServiceInstanceHealthState extends models['ReplicaHealthState'] { /** * Create a StatelessServiceInstanceHealthState. - * @member {string} [replicaId] + * @member {string} [replicaId] Id of the stateless service instance on the + * wire this field is called ReplicaId. */ constructor() { super(); @@ -39,6 +40,11 @@ class StatelessServiceInstanceHealthState extends models['ReplicaHealthState'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'EntityHealthState', className: 'StatelessServiceInstanceHealthState', modelProperties: { aggregatedHealthState: { @@ -58,6 +64,7 @@ class StatelessServiceInstanceHealthState extends models['ReplicaHealthState'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceInstanceInfo.js b/lib/services/serviceFabric/lib/models/statelessServiceInstanceInfo.js index edace5e426..e69e1aa4f4 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceInstanceInfo.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceInstanceInfo.js @@ -22,7 +22,12 @@ const models = require('./index'); class StatelessServiceInstanceInfo extends models['ReplicaInfo'] { /** * Create a StatelessServiceInstanceInfo. - * @member {string} [instanceId] + * @member {string} [instanceId] 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. */ constructor() { super(); @@ -40,6 +45,11 @@ class StatelessServiceInstanceInfo extends models['ReplicaInfo'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ReplicaInfo', className: 'StatelessServiceInstanceInfo', modelProperties: { replicaStatus: { @@ -80,6 +90,7 @@ class StatelessServiceInstanceInfo extends models['ReplicaInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServicePartitionInfo.js b/lib/services/serviceFabric/lib/models/statelessServicePartitionInfo.js index d68d1152e8..40991cc99e 100644 --- a/lib/services/serviceFabric/lib/models/statelessServicePartitionInfo.js +++ b/lib/services/serviceFabric/lib/models/statelessServicePartitionInfo.js @@ -38,6 +38,11 @@ class StatelessServicePartitionInfo extends models['ServicePartitionInfo'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServicePartitionInfo', className: 'StatelessServicePartitionInfo', modelProperties: { healthState: { @@ -70,6 +75,7 @@ class StatelessServicePartitionInfo extends models['ServicePartitionInfo'] { serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js b/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js index ea1a6470c8..ed72bd8b4f 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js @@ -42,6 +42,11 @@ class StatelessServiceTypeDescription extends models['ServiceTypeDescription'] { serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ServiceTypeDescription', className: 'StatelessServiceTypeDescription', modelProperties: { isStateful: { @@ -103,6 +108,7 @@ class StatelessServiceTypeDescription extends models['ServiceTypeDescription'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/statelessServiceUpdateDescription.js b/lib/services/serviceFabric/lib/models/statelessServiceUpdateDescription.js index d9c7e59b56..64f81cd0c0 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceUpdateDescription.js @@ -38,6 +38,11 @@ class StatelessServiceUpdateDescription extends models['ServiceUpdateDescription serializedName: 'Stateless', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ServiceKind', + clientName: 'serviceKind' + }, + uberParent: 'ServiceUpdateDescription', className: 'StatelessServiceUpdateDescription', modelProperties: { flags: { @@ -111,9 +116,25 @@ class StatelessServiceUpdateDescription extends models['ServiceUpdateDescription name: 'String' } }, + scalingPolicies: { + required: false, + serializedName: 'ScalingPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ScalingPolicyDescriptionElementType', + type: { + name: 'Composite', + className: 'ScalingPolicyDescription' + } + } + } + }, serviceKind: { required: true, serializedName: 'ServiceKind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/stoppedChaosEvent.js b/lib/services/serviceFabric/lib/models/stoppedChaosEvent.js index a2ab2b4f6c..82543c6094 100644 --- a/lib/services/serviceFabric/lib/models/stoppedChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/stoppedChaosEvent.js @@ -21,7 +21,9 @@ const models = require('./index'); class StoppedChaosEvent extends models['ChaosEvent'] { /** * Create a StoppedChaosEvent. - * @member {string} [reason] + * @member {string} [reason] Describes why Chaos stopped. Chaos can stop + * because of StopChaos API call or the timeToRun provided in ChaosParameters + * is over. */ constructor() { super(); @@ -39,6 +41,11 @@ class StoppedChaosEvent extends models['ChaosEvent'] { serializedName: 'Stopped', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'StoppedChaosEvent', modelProperties: { timeStampUtc: { @@ -51,6 +58,7 @@ class StoppedChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/stringPropertyValue.js b/lib/services/serviceFabric/lib/models/stringPropertyValue.js new file mode 100644 index 0000000000..7bcaab42ab --- /dev/null +++ b/lib/services/serviceFabric/lib/models/stringPropertyValue.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes a Service Fabric property value of type String. + * + * @extends models['PropertyValue'] + */ +class StringPropertyValue extends models['PropertyValue'] { + /** + * Create a StringPropertyValue. + * @member {string} data The data of the property value. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of StringPropertyValue + * + * @returns {object} metadata of StringPropertyValue + * + */ + mapper() { + return { + required: false, + serializedName: 'String', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyValue', + className: 'StringPropertyValue', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + data: { + required: true, + serializedName: 'Data', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = StringPropertyValue; diff --git a/lib/services/serviceFabric/lib/models/successfulPropertyBatchInfo.js b/lib/services/serviceFabric/lib/models/successfulPropertyBatchInfo.js new file mode 100644 index 0000000000..5231d571ab --- /dev/null +++ b/lib/services/serviceFabric/lib/models/successfulPropertyBatchInfo.js @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Derived from PropertyBatchInfo. Represents the property batch succeeding. + * Contains the results of any "Get" operations in the batch. + * + * @extends models['PropertyBatchInfo'] + */ +class SuccessfulPropertyBatchInfo extends models['PropertyBatchInfo'] { + /** + * Create a SuccessfulPropertyBatchInfo. + * @member {object} [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. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of SuccessfulPropertyBatchInfo + * + * @returns {object} metadata of SuccessfulPropertyBatchInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'Successful', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'PropertyBatchInfo', + className: 'SuccessfulPropertyBatchInfo', + modelProperties: { + kind: { + required: true, + serializedName: 'Kind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + properties: { + required: false, + serializedName: 'Properties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'PropertyInfoElementType', + type: { + name: 'Composite', + className: 'PropertyInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = SuccessfulPropertyBatchInfo; diff --git a/lib/services/serviceFabric/lib/models/systemApplicationHealthEvaluation.js b/lib/services/serviceFabric/lib/models/systemApplicationHealthEvaluation.js index cbde8086d9..f2d0dedbc0 100644 --- a/lib/services/serviceFabric/lib/models/systemApplicationHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/systemApplicationHealthEvaluation.js @@ -23,7 +23,11 @@ const models = require('./index'); class SystemApplicationHealthEvaluation extends models['HealthEvaluation'] { /** * Create a SystemApplicationHealthEvaluation. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] 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. */ constructor() { super(); @@ -41,6 +45,11 @@ class SystemApplicationHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'SystemApplication', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'SystemApplicationHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -60,6 +69,7 @@ class SystemApplicationHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js b/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js index a6e06f6dec..6b478d0b79 100644 --- a/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js @@ -16,8 +16,8 @@ const models = require('./index'); * 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 - * a faultable entity, Chaos found that the entity was alreay faulted -- which - * would be an unexpected event. + * an entity, Chaos found that the entity was already faulted -- which would be + * an unexpected event. * * * @extends models['ChaosEvent'] @@ -25,7 +25,10 @@ const models = require('./index'); class TestErrorChaosEvent extends models['ChaosEvent'] { /** * Create a TestErrorChaosEvent. - * @member {string} [reason] + * @member {string} [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. */ constructor() { super(); @@ -43,6 +46,11 @@ class TestErrorChaosEvent extends models['ChaosEvent'] { serializedName: 'TestError', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'TestErrorChaosEvent', modelProperties: { timeStampUtc: { @@ -55,6 +63,7 @@ class TestErrorChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js new file mode 100644 index 0000000000..11ef33811a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js @@ -0,0 +1,105 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the time based backup schedule. + * + * @extends models['BackupScheduleDescription'] + */ +class TimeBasedBackupScheduleDescription extends models['BackupScheduleDescription'] { + /** + * Create a TimeBasedBackupScheduleDescription. + * @member {string} scheduleFrequencyType Describes the frequency with which + * to run the time based backup schedule. + * . Possible values include: 'Invalid', 'Daily', 'Weekly' + * @member {array} [runDays] List of days of a week when to trigger the + * periodic backup. This is valid only when the backup schedule frequency + * type is weekly. + * @member {array} runTimes 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. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of TimeBasedBackupScheduleDescription + * + * @returns {object} metadata of TimeBasedBackupScheduleDescription + * + */ + mapper() { + return { + required: false, + serializedName: 'TimeBased', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'ScheduleKind', + clientName: 'scheduleKind' + }, + uberParent: 'BackupScheduleDescription', + className: 'TimeBasedBackupScheduleDescription', + modelProperties: { + scheduleKind: { + required: true, + serializedName: 'ScheduleKind', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + scheduleFrequencyType: { + required: true, + serializedName: 'ScheduleFrequencyType', + type: { + name: 'String' + } + }, + runDays: { + required: false, + serializedName: 'RunDays', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + runTimes: { + required: true, + serializedName: 'RunTimes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DateElementType', + type: { + name: 'DateTime' + } + } + } + } + } + } + }; + } +} + +module.exports = TimeBasedBackupScheduleDescription; diff --git a/lib/services/serviceFabric/lib/models/timeOfDay.js b/lib/services/serviceFabric/lib/models/timeOfDay.js new file mode 100644 index 0000000000..b5bd41e0b6 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/timeOfDay.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Defines an hour and minute of the day specified in 24 hour time. + * + */ +class TimeOfDay { + /** + * Create a TimeOfDay. + * @member {number} [hour] Represents the hour of the day. Value must be + * between 0 and 23 inclusive. + * @member {number} [minute] Represents the minute of the hour. Value must be + * between 0 to 59 inclusive. + */ + constructor() { + } + + /** + * Defines the metadata of TimeOfDay + * + * @returns {object} metadata of TimeOfDay + * + */ + mapper() { + return { + required: false, + serializedName: 'TimeOfDay', + type: { + name: 'Composite', + className: 'TimeOfDay', + modelProperties: { + hour: { + required: false, + serializedName: 'Hour', + constraints: { + InclusiveMaximum: 23, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + }, + minute: { + required: false, + serializedName: 'Minute', + constraints: { + InclusiveMaximum: 59, + InclusiveMinimum: 0 + }, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = TimeOfDay; diff --git a/lib/services/serviceFabric/lib/models/timeRange.js b/lib/services/serviceFabric/lib/models/timeRange.js new file mode 100644 index 0000000000..af6890f1b9 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/timeRange.js @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Defines a time range in a 24 hour day specified by a start and end time. + * + */ +class TimeRange { + /** + * Create a TimeRange. + * @member {object} [startTime] Defines an hour and minute of the day + * specified in 24 hour time. + * @member {number} [startTime.hour] Represents the hour of the day. Value + * must be between 0 and 23 inclusive. + * @member {number} [startTime.minute] Represents the minute of the hour. + * Value must be between 0 to 59 inclusive. + * @member {object} [endTime] Defines an hour and minute of the day specified + * in 24 hour time. + * @member {number} [endTime.hour] Represents the hour of the day. Value must + * be between 0 and 23 inclusive. + * @member {number} [endTime.minute] Represents the minute of the hour. Value + * must be between 0 to 59 inclusive. + */ + constructor() { + } + + /** + * Defines the metadata of TimeRange + * + * @returns {object} metadata of TimeRange + * + */ + mapper() { + return { + required: false, + serializedName: 'TimeRange', + type: { + name: 'Composite', + className: 'TimeRange', + modelProperties: { + startTime: { + required: false, + serializedName: 'StartTime', + type: { + name: 'Composite', + className: 'TimeOfDay' + } + }, + endTime: { + required: false, + serializedName: 'EndTime', + type: { + name: 'Composite', + className: 'TimeOfDay' + } + } + } + } + }; + } +} + +module.exports = TimeRange; diff --git a/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js b/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js index 68a8b65bd2..0fea7502e1 100644 --- a/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js +++ b/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js @@ -45,11 +45,17 @@ class UniformInt64RangePartitionSchemeDescription extends models['PartitionSchem serializedName: 'UniformInt64Range', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'PartitionScheme', + clientName: 'partitionScheme' + }, + uberParent: 'PartitionSchemeDescription', className: 'UniformInt64RangePartitionSchemeDescription', modelProperties: { partitionScheme: { required: true, serializedName: 'PartitionScheme', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/unprovisionApplicationTypeDescriptionInfo.js b/lib/services/serviceFabric/lib/models/unprovisionApplicationTypeDescriptionInfo.js new file mode 100644 index 0000000000..c0a9f4b39e --- /dev/null +++ b/lib/services/serviceFabric/lib/models/unprovisionApplicationTypeDescriptionInfo.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the operation to unregister or unprovision an application type and + * its version that was registered with the Service Fabric. + * + */ +class UnprovisionApplicationTypeDescriptionInfo { + /** + * Create a UnprovisionApplicationTypeDescriptionInfo. + * @member {string} applicationTypeVersion The version of the application + * type as defined in the application manifest. + * @member {boolean} [async] 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 to set it to true for large application packages + * that were provisioned. + */ + constructor() { + } + + /** + * Defines the metadata of UnprovisionApplicationTypeDescriptionInfo + * + * @returns {object} metadata of UnprovisionApplicationTypeDescriptionInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'UnprovisionApplicationTypeDescriptionInfo', + type: { + name: 'Composite', + className: 'UnprovisionApplicationTypeDescriptionInfo', + modelProperties: { + applicationTypeVersion: { + required: true, + serializedName: 'ApplicationTypeVersion', + type: { + name: 'String' + } + }, + async: { + required: false, + serializedName: 'Async', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = UnprovisionApplicationTypeDescriptionInfo; diff --git a/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js b/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js index 4fe2b4dc2d..b7a7b72c4e 100644 --- a/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js @@ -19,22 +19,62 @@ const models = require('./index'); class UpdateClusterUpgradeDescription { /** * Create a UpdateClusterUpgradeDescription. - * @member {string} [upgradeKind] Possible values include: 'Invalid', - * 'Rolling', 'Rolling_ForceRestart'. Default value: 'Rolling' . - * @member {object} [updateDescription] - * @member {string} [updateDescription.rollingUpgradeMode] Possible values - * include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' - * @member {boolean} [updateDescription.forceRestart] + * @member {string} [upgradeKind] The type of upgrade out of the following + * possible values. Possible values include: 'Invalid', 'Rolling', + * 'Rolling_ForceRestart'. Default value: 'Rolling' . + * @member {object} [updateDescription] Describes the parameters for updating + * a rolling upgrade of application or cluster. + * @member {string} [updateDescription.rollingUpgradeMode] The mode used to + * monitor health during a rolling upgrade. The values are UnmonitoredAuto, + * UnmonitoredManual, and Monitored. Possible values include: 'Invalid', + * 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * @member {boolean} [updateDescription.forceRestart] If true, then processes + * are forcefully restarted during upgrade even when the code version has not + * changed (the upgrade only changes configuration or data). * @member {number} [updateDescription.replicaSetCheckTimeoutInMilliseconds] - * @member {string} [updateDescription.failureAction] Possible values - * include: 'Invalid', 'Rollback', 'Manual' + * 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). + * @member {string} [updateDescription.failureAction] 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' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * @member {string} - * [updateDescription.healthCheckStableDurationInMilliseconds] + * [updateDescription.healthCheckStableDurationInMilliseconds] 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. * @member {string} [updateDescription.healthCheckRetryTimeoutInMilliseconds] - * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * @member {string} [updateDescription.upgradeTimeoutInMilliseconds] 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. * @member {string} [updateDescription.upgradeDomainTimeoutInMilliseconds] - * @member {object} [clusterHealthPolicy] + * 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. + * @member {object} [clusterHealthPolicy] Defines a health policy used to + * evaluate the health of the cluster or of a cluster node. * @member {boolean} [clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. * @member {number} [clusterHealthPolicy.maxPercentUnhealthyNodes] The @@ -69,8 +109,34 @@ class UpdateClusterUpgradeDescription { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * @member {array} [clusterHealthPolicy.applicationTypeHealthPolicyMap] - * @member {boolean} [enableDeltaHealthEvaluation] - * @member {object} [clusterUpgradeHealthPolicy] + * 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. + * @member {boolean} [enableDeltaHealthEvaluation] When true, enables delta + * health evaluation rather than absolute health evaluation after completion + * of each upgrade domain. + * @member {object} [clusterUpgradeHealthPolicy] Defines a health policy used + * to evaluate the health of the cluster during a cluster upgrade. * @member {number} * [clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] The maximum * allowed percentage of nodes health degradation allowed during cluster @@ -88,8 +154,12 @@ class UpdateClusterUpgradeDescription { * 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%. - * @member {object} [applicationHealthPolicyMap] + * @member {object} [applicationHealthPolicyMap] Defines the application + * health policy map used to evaluate the health of an application or one of + * its children entities. * @member {array} [applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js b/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js index b92c1c56f2..a21220d796 100644 --- a/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js @@ -37,7 +37,9 @@ class UpgradeDomainDeltaNodesCheckHealthEvaluation extends models['HealthEvaluat * ClusterUpgradeHealthPolicy. * @member {number} [totalCount] Total number of upgrade domain nodes in the * health store. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -55,6 +57,11 @@ class UpgradeDomainDeltaNodesCheckHealthEvaluation extends models['HealthEvaluat serializedName: 'UpgradeDomainDeltaNodesCheck', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'UpgradeDomainDeltaNodesCheckHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -74,6 +81,7 @@ class UpgradeDomainDeltaNodesCheckHealthEvaluation extends models['HealthEvaluat kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/upgradeDomainInfo.js b/lib/services/serviceFabric/lib/models/upgradeDomainInfo.js index 22993db001..585b70b9fa 100644 --- a/lib/services/serviceFabric/lib/models/upgradeDomainInfo.js +++ b/lib/services/serviceFabric/lib/models/upgradeDomainInfo.js @@ -17,9 +17,9 @@ class UpgradeDomainInfo { /** * Create a UpgradeDomainInfo. - * @member {string} [name] - * @member {string} [state] Possible values include: 'Invalid', 'Pending', - * 'InProgress', 'Completed' + * @member {string} [name] The name of the upgrade domain + * @member {string} [state] The state of the upgrade domain. Possible values + * include: 'Invalid', 'Pending', 'InProgress', 'Completed' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/upgradeDomainNodesHealthEvaluation.js b/lib/services/serviceFabric/lib/models/upgradeDomainNodesHealthEvaluation.js index cf5d58fea8..7a3f853fd6 100644 --- a/lib/services/serviceFabric/lib/models/upgradeDomainNodesHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/upgradeDomainNodesHealthEvaluation.js @@ -30,7 +30,9 @@ class UpgradeDomainNodesHealthEvaluation extends models['HealthEvaluation'] { * unhealthy nodes from the ClusterHealthPolicy. * @member {number} [totalCount] Total number of nodes in the current upgrade * domain. - * @member {array} [unhealthyEvaluations] + * @member {array} [unhealthyEvaluations] List of unhealthy evaluations that + * led to the aggregated health state. Includes all the unhealthy + * NodeHealthEvaluation that impacted the aggregated health. */ constructor() { super(); @@ -48,6 +50,11 @@ class UpgradeDomainNodesHealthEvaluation extends models['HealthEvaluation'] { serializedName: 'UpgradeDomainNodes', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'HealthEvaluation', className: 'UpgradeDomainNodesHealthEvaluation', modelProperties: { aggregatedHealthState: { @@ -67,6 +74,7 @@ class UpgradeDomainNodesHealthEvaluation extends models['HealthEvaluation'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceState.js b/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceState.js new file mode 100644 index 0000000000..3f81f09f63 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceState.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Service state of Service Fabric Upgrade Orchestration Service. + * + */ +class UpgradeOrchestrationServiceState { + /** + * Create a UpgradeOrchestrationServiceState. + * @member {string} [serviceState] The state of Service Fabric Upgrade + * Orchestration Service. + */ + constructor() { + } + + /** + * Defines the metadata of UpgradeOrchestrationServiceState + * + * @returns {object} metadata of UpgradeOrchestrationServiceState + * + */ + mapper() { + return { + required: false, + serializedName: 'UpgradeOrchestrationServiceState', + type: { + name: 'Composite', + className: 'UpgradeOrchestrationServiceState', + modelProperties: { + serviceState: { + required: false, + serializedName: 'ServiceState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpgradeOrchestrationServiceState; diff --git a/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceStateSummary.js b/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceStateSummary.js new file mode 100644 index 0000000000..f625b76d50 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/upgradeOrchestrationServiceStateSummary.js @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Service state summary of Service Fabric Upgrade Orchestration Service. + * + */ +class UpgradeOrchestrationServiceStateSummary { + /** + * Create a UpgradeOrchestrationServiceStateSummary. + * @member {string} [currentCodeVersion] The current code version of the + * cluster. + * @member {string} [currentManifestVersion] The current manifest version of + * the cluster. + * @member {string} [targetCodeVersion] The target code version of the + * cluster. + * @member {string} [targetManifestVersion] The target manifest version of + * the cluster. + * @member {string} [pendingUpgradeType] The type of the pending upgrade of + * the cluster. + */ + constructor() { + } + + /** + * Defines the metadata of UpgradeOrchestrationServiceStateSummary + * + * @returns {object} metadata of UpgradeOrchestrationServiceStateSummary + * + */ + mapper() { + return { + required: false, + serializedName: 'UpgradeOrchestrationServiceStateSummary', + type: { + name: 'Composite', + className: 'UpgradeOrchestrationServiceStateSummary', + modelProperties: { + currentCodeVersion: { + required: false, + serializedName: 'CurrentCodeVersion', + type: { + name: 'String' + } + }, + currentManifestVersion: { + required: false, + serializedName: 'CurrentManifestVersion', + type: { + name: 'String' + } + }, + targetCodeVersion: { + required: false, + serializedName: 'TargetCodeVersion', + type: { + name: 'String' + } + }, + targetManifestVersion: { + required: false, + serializedName: 'TargetManifestVersion', + type: { + name: 'String' + } + }, + pendingUpgradeType: { + required: false, + serializedName: 'PendingUpgradeType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpgradeOrchestrationServiceStateSummary; diff --git a/lib/services/serviceFabric/lib/models/uploadChunkRange.js b/lib/services/serviceFabric/lib/models/uploadChunkRange.js new file mode 100644 index 0000000000..863c4a0f1b --- /dev/null +++ b/lib/services/serviceFabric/lib/models/uploadChunkRange.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Information about which portion of the file to upload. + * + */ +class UploadChunkRange { + /** + * Create a UploadChunkRange. + * @member {string} [startPosition] The start position of the portion of the + * file. It's represented by the number of bytes. + * @member {string} [endPosition] The end position of the portion of the + * file. It's represented by the number of bytes. + */ + constructor() { + } + + /** + * Defines the metadata of UploadChunkRange + * + * @returns {object} metadata of UploadChunkRange + * + */ + mapper() { + return { + required: false, + serializedName: 'UploadChunkRange', + type: { + name: 'Composite', + className: 'UploadChunkRange', + modelProperties: { + startPosition: { + required: false, + serializedName: 'StartPosition', + type: { + name: 'String' + } + }, + endPosition: { + required: false, + serializedName: 'EndPosition', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UploadChunkRange; diff --git a/lib/services/serviceFabric/lib/models/uploadSession.js b/lib/services/serviceFabric/lib/models/uploadSession.js new file mode 100644 index 0000000000..2d4b69fcf2 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/uploadSession.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Information about a image store upload session + * + */ +class UploadSession { + /** + * Create a UploadSession. + * @member {array} [uploadSessions] 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. + */ + constructor() { + } + + /** + * Defines the metadata of UploadSession + * + * @returns {object} metadata of UploadSession + * + */ + mapper() { + return { + required: false, + serializedName: 'UploadSession', + type: { + name: 'Composite', + className: 'UploadSession', + modelProperties: { + uploadSessions: { + required: false, + serializedName: 'UploadSessions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UploadSessionInfoElementType', + type: { + name: 'Composite', + className: 'UploadSessionInfo' + } + } + } + } + } + } + }; + } +} + +module.exports = UploadSession; diff --git a/lib/services/serviceFabric/lib/models/uploadSessionInfo.js b/lib/services/serviceFabric/lib/models/uploadSessionInfo.js new file mode 100644 index 0000000000..3d6b37f7a4 --- /dev/null +++ b/lib/services/serviceFabric/lib/models/uploadSessionInfo.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Information about an image store upload session. A session is associated + * with a relative path in the image store. + * + */ +class UploadSessionInfo { + /** + * Create a UploadSessionInfo. + * @member {string} [storeRelativePath] The remote location within image + * store. This path is relative to the image store root. + * @member {uuid} [sessionId] A unique ID of the upload session. A session ID + * can be reused only if the session was committed or removed. + * @member {date} [modifiedDate] The date and time when the upload session + * was last modified. + * @member {string} [fileSize] The size in bytes of the uploading file. + * @member {array} [expectedRanges] List of chunk ranges that image store has + * not received yet. + */ + constructor() { + } + + /** + * Defines the metadata of UploadSessionInfo + * + * @returns {object} metadata of UploadSessionInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'UploadSessionInfo', + type: { + name: 'Composite', + className: 'UploadSessionInfo', + modelProperties: { + storeRelativePath: { + required: false, + serializedName: 'StoreRelativePath', + type: { + name: 'String' + } + }, + sessionId: { + required: false, + serializedName: 'SessionId', + type: { + name: 'String' + } + }, + modifiedDate: { + required: false, + serializedName: 'ModifiedDate', + type: { + name: 'DateTime' + } + }, + fileSize: { + required: false, + serializedName: 'FileSize', + type: { + name: 'String' + } + }, + expectedRanges: { + required: false, + serializedName: 'ExpectedRanges', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UploadChunkRangeElementType', + type: { + name: 'Composite', + className: 'UploadChunkRange' + } + } + } + } + } + } + }; + } +} + +module.exports = UploadSessionInfo; diff --git a/lib/services/serviceFabric/lib/models/validationFailedChaosEvent.js b/lib/services/serviceFabric/lib/models/validationFailedChaosEvent.js index e0b3df9d91..7784a88774 100644 --- a/lib/services/serviceFabric/lib/models/validationFailedChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/validationFailedChaosEvent.js @@ -20,7 +20,10 @@ const models = require('./index'); class ValidationFailedChaosEvent extends models['ChaosEvent'] { /** * Create a ValidationFailedChaosEvent. - * @member {string} [reason] + * @member {string} [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. */ constructor() { super(); @@ -38,6 +41,11 @@ class ValidationFailedChaosEvent extends models['ChaosEvent'] { serializedName: 'ValidationFailed', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'ValidationFailedChaosEvent', modelProperties: { timeStampUtc: { @@ -50,6 +58,7 @@ class ValidationFailedChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/waitForInbuildReplicaSafetyCheck.js b/lib/services/serviceFabric/lib/models/waitForInbuildReplicaSafetyCheck.js index 56f0be305b..995e70afa0 100644 --- a/lib/services/serviceFabric/lib/models/waitForInbuildReplicaSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/waitForInbuildReplicaSafetyCheck.js @@ -14,9 +14,9 @@ const models = require('./index'); /** * Safety check that waits for the replica build operation to finish. This - * indiciates that there is a replica that is going through the copy or is + * 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 typoically expensive involving data movements. + * this copy operation which are typically expensive involving data movements. * * @extends models['PartitionSafetyCheck'] */ @@ -40,11 +40,17 @@ class WaitForInbuildReplicaSafetyCheck extends models['PartitionSafetyCheck'] { serializedName: 'WaitForInbuildReplica', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'WaitForInbuildReplicaSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/waitForPrimaryPlacementSafetyCheck.js b/lib/services/serviceFabric/lib/models/waitForPrimaryPlacementSafetyCheck.js index f5cdfab9a7..7124103e10 100644 --- a/lib/services/serviceFabric/lib/models/waitForPrimaryPlacementSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/waitForPrimaryPlacementSafetyCheck.js @@ -38,11 +38,17 @@ class WaitForPrimaryPlacementSafetyCheck extends models['PartitionSafetyCheck'] serializedName: 'WaitForPrimaryPlacement', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'WaitForPrimaryPlacementSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/waitForPrimarySwapSafetyCheck.js b/lib/services/serviceFabric/lib/models/waitForPrimarySwapSafetyCheck.js index 4d6fbe16de..4f2795e1f4 100644 --- a/lib/services/serviceFabric/lib/models/waitForPrimarySwapSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/waitForPrimarySwapSafetyCheck.js @@ -39,11 +39,17 @@ class WaitForPrimarySwapSafetyCheck extends models['PartitionSafetyCheck'] { serializedName: 'WaitForPrimarySwap', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'WaitForPrimarySwapSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/waitForReconfigurationSafetyCheck.js b/lib/services/serviceFabric/lib/models/waitForReconfigurationSafetyCheck.js index 1243b00ced..85f474ca39 100644 --- a/lib/services/serviceFabric/lib/models/waitForReconfigurationSafetyCheck.js +++ b/lib/services/serviceFabric/lib/models/waitForReconfigurationSafetyCheck.js @@ -38,11 +38,17 @@ class WaitForReconfigurationSafetyCheck extends models['PartitionSafetyCheck'] { serializedName: 'WaitForReconfiguration', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'SafetyCheck', className: 'WaitForReconfigurationSafetyCheck', modelProperties: { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/models/waitingChaosEvent.js b/lib/services/serviceFabric/lib/models/waitingChaosEvent.js index 2cae8f3607..9eec5e08a9 100644 --- a/lib/services/serviceFabric/lib/models/waitingChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/waitingChaosEvent.js @@ -22,7 +22,8 @@ const models = require('./index'); class WaitingChaosEvent extends models['ChaosEvent'] { /** * Create a WaitingChaosEvent. - * @member {string} [reason] + * @member {string} [reason] Describes why the WaitingChaosEvent was + * generated, for example, due to a cluster upgrade. */ constructor() { super(); @@ -40,6 +41,11 @@ class WaitingChaosEvent extends models['ChaosEvent'] { serializedName: 'Waiting', type: { name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'ChaosEvent', className: 'WaitingChaosEvent', modelProperties: { timeStampUtc: { @@ -52,6 +58,7 @@ class WaitingChaosEvent extends models['ChaosEvent'] { kind: { required: true, serializedName: 'Kind', + isPolymorphicDiscriminator: true, type: { name: 'String' } diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts index a186af8046..2e629e7492 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts +++ b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts @@ -11,7 +11,7 @@ import { ServiceClient, ServiceClientOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest'; import * as models from "./models"; -declare class ServiceFabricClient extends ServiceClient { +export default class ServiceFabricClient extends ServiceClient { /** * @class * Initializes a new instance of the ServiceFabricClient class. @@ -37,13 +37,13 @@ declare class ServiceFabricClient extends ServiceClient { * * Get the Service Fabric cluster manifest. The cluster manifest contains * properties of the cluster that include different node types on the cluster, - * security configurations, fault and upgrade domain topologies etc. + * security configurations, fault and upgrade domain topologies, etc. * * These properties are specified as part of the ClusterConfig.JSON file while * deploying a stand alone cluster. However, most of the information in the * cluster manifest * is generated internally by service fabric during cluster deployment in other - * deployment scenarios (for e.g when using azuer portal). + * 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 @@ -53,9 +53,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -73,13 +73,13 @@ declare class ServiceFabricClient extends ServiceClient { * * Get the Service Fabric cluster manifest. The cluster manifest contains * properties of the cluster that include different node types on the cluster, - * security configurations, fault and upgrade domain topologies etc. + * security configurations, fault and upgrade domain topologies, etc. * * These properties are specified as part of the ClusterConfig.JSON file while * deploying a stand alone cluster. However, most of the information in the * cluster manifest * is generated internally by service fabric during cluster deployment in other - * deployment scenarios (for e.g when using azuer portal). + * 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 @@ -89,9 +89,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -231,9 +231,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -354,9 +354,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -511,8 +511,21 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] @@ -556,11 +569,34 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -696,8 +732,21 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] @@ -741,11 +790,34 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -791,9 +863,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -820,9 +892,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -923,7 +995,10 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. + * * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] @@ -967,17 +1042,45 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1059,7 +1162,10 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. + * * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] @@ -1103,17 +1209,45 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1186,11 +1320,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -1225,7 +1361,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -1242,15 +1378,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -1259,9 +1395,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1315,11 +1451,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -1354,7 +1492,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -1371,15 +1509,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -1388,9 +1526,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1434,9 +1572,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [options.codeVersion] The product version of Service Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1462,9 +1600,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [options.codeVersion] The product version of Service Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1509,9 +1647,9 @@ declare class ServiceFabricClient extends ServiceClient { * Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1538,9 +1676,9 @@ declare class ServiceFabricClient extends ServiceClient { * Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1580,9 +1718,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1604,9 +1742,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1645,7 +1783,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * security configurations, fault and upgrade domain topologies, etc. * * * @param {string} configurationApiVersion The API version of the Standalone @@ -1654,9 +1792,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1675,7 +1813,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * security configurations, fault and upgrade domain topologies, etc. * * * @param {string} configurationApiVersion The API version of the Standalone @@ -1684,9 +1822,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1722,16 +1860,16 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Get the cluster configuration upgrade status of a Service Fabric * standalone cluster. * - * 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1748,16 +1886,16 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Get the cluster configuration upgrade status of a Service Fabric * standalone cluster. * - * 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1790,6 +1928,158 @@ declare class ServiceFabricClient extends ServiceClient { getClusterConfigurationUpgradeStatus(options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getUpgradeOrchestrationServiceStateWithHttpOperationResponse(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {UpgradeOrchestrationServiceState} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {UpgradeOrchestrationServiceState} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceState} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getUpgradeOrchestrationServiceState(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getUpgradeOrchestrationServiceState(callback: ServiceCallback): void; + getUpgradeOrchestrationServiceState(options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. + * + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + setUpgradeOrchestrationServiceStateWithHttpOperationResponse(upgradeOrchestrationServiceState: models.UpgradeOrchestrationServiceState, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. + * + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {UpgradeOrchestrationServiceStateSummary} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {UpgradeOrchestrationServiceStateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceStateSummary} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState: models.UpgradeOrchestrationServiceState, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState: models.UpgradeOrchestrationServiceState, callback: ServiceCallback): void; + setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState: models.UpgradeOrchestrationServiceState, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Provision the code or configuration packages of a Service Fabric * cluster. @@ -1809,9 +2099,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1843,9 +2133,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1881,6 +2171,7 @@ declare class ServiceFabricClient extends ServiceClient { * cluster. * * Unprovision the code or configuration packages of a Service Fabric cluster. + * It is supported to unprovision code and configuration separately. * * @param {object} unprovisionFabricDescription Describes the parameters for * unprovisioning a cluster. @@ -1894,9 +2185,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1914,6 +2205,7 @@ declare class ServiceFabricClient extends ServiceClient { * cluster. * * Unprovision the code or configuration packages of a Service Fabric cluster. + * It is supported to unprovision code and configuration separately. * * @param {object} unprovisionFabricDescription Describes the parameters for * unprovisioning a cluster. @@ -1927,9 +2219,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1963,14 +2255,14 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Rollback the upgrade of a Service Fabric cluster. * - * Rollback the upgrade of a Service Fabric cluster. + * Rollback the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1986,14 +2278,14 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Rollback the upgrade of a Service Fabric cluster. * - * Rollback the upgrade of a Service Fabric cluster. + * Rollback the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2027,7 +2319,8 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Make the cluster upgrade move on to the next upgrade domain. * - * 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 {object} resumeClusterUpgradeDescription Describes the parameters for * resuming a cluster upgrade. @@ -2038,9 +2331,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2056,7 +2349,8 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Make the cluster upgrade move on to the next upgrade domain. * - * 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 {object} resumeClusterUpgradeDescription Describes the parameters for * resuming a cluster upgrade. @@ -2067,9 +2361,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2117,40 +2411,82 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [startClusterUpgradeDescription.configVersion] The cluster * configuration version. * - * @param {string} [startClusterUpgradeDescription.upgradeKind] Possible values - * include: 'Invalid', 'Rolling' + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -2194,6 +2530,29 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, @@ -2201,6 +2560,8 @@ declare class ServiceFabricClient extends ServiceClient { * completion of each upgrade domain. * * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -2222,16 +2583,21 @@ declare class ServiceFabricClient extends ServiceClient { * tolerated limits. The default value is 15%. * * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2261,40 +2627,82 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [startClusterUpgradeDescription.configVersion] The cluster * configuration version. * - * @param {string} [startClusterUpgradeDescription.upgradeKind] Possible values - * include: 'Invalid', 'Rolling' + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -2338,6 +2746,29 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, @@ -2345,6 +2776,8 @@ declare class ServiceFabricClient extends ServiceClient { * completion of each upgrade domain. * * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -2366,16 +2799,21 @@ declare class ServiceFabricClient extends ServiceClient { * tolerated limits. The default value is 15%. * * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2464,9 +2902,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2537,9 +2975,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2573,47 +3011,90 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. * - * Update the upgrade parameters of a Service Fabric cluster upgrade. + * Update the upgrade parameters used during a Service Fabric cluster upgrade. * * @param {object} updateClusterUpgradeDescription Parameters for updating a * cluster upgrade. * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] Possible - * values include: 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' * * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {number} * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [updateClusterUpgradeDescription.updateDescription.failureAction] 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' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -2657,11 +3138,38 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. * * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -2683,16 +3191,21 @@ declare class ServiceFabricClient extends ServiceClient { * tolerated limits. The default value is 15%. * * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2708,47 +3221,90 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. * - * Update the upgrade parameters of a Service Fabric cluster upgrade. + * Update the upgrade parameters used during a Service Fabric cluster upgrade. * * @param {object} updateClusterUpgradeDescription Parameters for updating a * cluster upgrade. * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] Possible - * values include: 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' * * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {number} * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [updateClusterUpgradeDescription.updateDescription.failureAction] 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' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -2792,11 +3348,38 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. * * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -2818,16 +3401,21 @@ declare class ServiceFabricClient extends ServiceClient { * tolerated limits. The default value is 15%. * * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2872,9 +3460,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2901,9 +3489,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2938,9 +3526,8 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the list of nodes in the Service Fabric cluster. * - * The Nodes endpoint returns information about the nodes in the Service Fabric - * Cluster. The respons include the name, status, id, health, uptime and other - * details about the node. + * Gets the list of nodes in the Service Fabric cluster. The response includes + * the name, status, id, health, uptime, and other details about the node. * * @param {object} [options] Optional Parameters. * @@ -2955,31 +3542,13 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [options.nodeStatusFilter] 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 - This filter value will match all of the nodes excepts the ones - * with with status as Unknown or Removed. - * - all - This filter value will match all of the nodes. - * - up - This filter value will match nodes that are Up. - * - down - This filter value will match nodes that are Down. - * - enabling - This filter value will match nodes that are in the process of - * being enabled with status as Enabling. - * - disabling - This filter value will match nodes that are in the process of - * being disabled with status as Disabling. - * - disabled - This filter value will match nodes that are Disabled. - * - 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 - This filter value will match nodes whose status is Removed. - * These are the nodes that are removed from the cluster using the - * RemoveNodeState API. - * . Possible values include: 'default', 'all', 'up', 'down', 'enabling', + * Possible values include: 'default', 'all', 'up', 'down', 'enabling', * 'disabling', 'disabled', 'unknown', 'removed' * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2995,9 +3564,8 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the list of nodes in the Service Fabric cluster. * - * The Nodes endpoint returns information about the nodes in the Service Fabric - * Cluster. The respons include the name, status, id, health, uptime and other - * details about the node. + * Gets the list of nodes in the Service Fabric cluster. The response includes + * the name, status, id, health, uptime, and other details about the node. * * @param {object} [options] Optional Parameters. * @@ -3012,31 +3580,13 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [options.nodeStatusFilter] 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 - This filter value will match all of the nodes excepts the ones - * with with status as Unknown or Removed. - * - all - This filter value will match all of the nodes. - * - up - This filter value will match nodes that are Up. - * - down - This filter value will match nodes that are Down. - * - enabling - This filter value will match nodes that are in the process of - * being enabled with status as Enabling. - * - disabling - This filter value will match nodes that are in the process of - * being disabled with status as Disabling. - * - disabled - This filter value will match nodes that are Disabled. - * - 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 - This filter value will match nodes whose status is Removed. - * These are the nodes that are removed from the cluster using the - * RemoveNodeState API. - * . Possible values include: 'default', 'all', 'up', 'down', 'enabling', + * Possible values include: 'default', 'all', 'up', 'down', 'enabling', * 'disabling', 'disabled', 'unknown', 'removed' * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3069,20 +3619,21 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Gets the list of nodes in the Service Fabric cluster. + * @summary Gets the information about a specific node in the Service Fabric + * cluster. * - * Gets the information about a specific node in the Service Fabric Cluster.The - * respons include the name, status, id, health, uptime and other details about - * the node. + * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3096,20 +3647,21 @@ declare class ServiceFabricClient extends ServiceClient { getNodeInfoWithHttpOperationResponse(nodeName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the list of nodes in the Service Fabric cluster. + * @summary Gets the information about a specific node in the Service Fabric + * cluster. * - * Gets the information about a specific node in the Service Fabric Cluster.The - * respons include the name, status, id, health, uptime and other details about - * the node. + * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3178,9 +3730,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3230,9 +3782,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3346,11 +3898,34 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3445,11 +4020,34 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3523,11 +4121,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -3562,7 +4162,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -3579,15 +4179,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -3596,9 +4196,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3653,11 +4253,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -3692,7 +4294,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -3709,15 +4311,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -3726,9 +4328,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3762,16 +4364,17 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the load information of a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3787,16 +4390,17 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the load information of a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3850,19 +4454,14 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are * following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. * . Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3897,19 +4496,14 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are * following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. * . Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3954,9 +4548,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3983,9 +4577,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4035,9 +4629,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4069,9 +4663,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4112,10 +4706,10 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} restartNodeDescription The instance of the node to be * restarted and a flag indicating the need to take dump of the fabric process. * - * @param {string} restartNodeDescription.nodeInstanceId The instance id of the - * target node. If instance id is specified the node is restarted only if it + * @param {string} restartNodeDescription.nodeInstanceId 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. + * match any instance ID. The instance ID can be obtained using get node query. * * @param {string} [restartNodeDescription.createFabricDump] Specify True to * create a dump of the fabric node process. This is case sensitive. Possible @@ -4124,9 +4718,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4149,10 +4743,10 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} restartNodeDescription The instance of the node to be * restarted and a flag indicating the need to take dump of the fabric process. * - * @param {string} restartNodeDescription.nodeInstanceId The instance id of the - * target node. If instance id is specified the node is restarted only if it + * @param {string} restartNodeDescription.nodeInstanceId 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. + * match any instance ID. The instance ID can be obtained using get node query. * * @param {string} [restartNodeDescription.createFabricDump] Specify True to * create a dump of the fabric node process. This is case sensitive. Possible @@ -4161,9 +4755,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4213,9 +4807,10 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind for application type query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationTypeDefinitionKind value. The value is 0. + * 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 @@ -4241,13 +4836,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4279,9 +4874,10 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind for application type query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationTypeDefinitionKind value. The value is 0. + * 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 @@ -4307,13 +4903,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4370,6 +4966,9 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.applicationTypeVersion] The version of the + * application type. + * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -4386,13 +4985,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4403,7 +5002,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName: string, options?: { excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName: string, options?: { applicationTypeVersion? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the list of application types in the Service Fabric cluster @@ -4429,6 +5028,9 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.applicationTypeVersion] The version of the + * application type. + * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -4445,13 +5047,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4479,31 +5081,45 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationTypeInfoListByName(applicationTypeName: string, options?: { excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationTypeInfoListByName(applicationTypeName: string, options?: { applicationTypeVersion? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; getApplicationTypeInfoListByName(applicationTypeName: string, callback: ServiceCallback): void; - getApplicationTypeInfoListByName(applicationTypeName: string, options: { excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getApplicationTypeInfoListByName(applicationTypeName: string, options: { applicationTypeVersion? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * @summary Provisions or registers a Service Fabric application type with the - * cluster. + * 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'. * - * Provisions or registers a Service Fabric application type with the cluster. - * This is required before any new applications can be instantiated. * - * @param {object} applicationTypeImageStorePath The relative path for the - * application package in the image store specified during the prior copy - * operation. + * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. + * + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async 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. * - * @param {string} applicationTypeImageStorePath.applicationTypeBuildPath The - * relative image store path to the application package. + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4514,28 +5130,42 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - provisionApplicationTypeWithHttpOperationResponse(applicationTypeImageStorePath: models.ApplicationTypeImageStorePath, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + provisionApplicationTypeWithHttpOperationResponse(provisionApplicationTypeDescriptionBaseRequiredBodyParam: models.ProvisionApplicationTypeDescriptionBase, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Provisions or registers a Service Fabric application type with the - * cluster. + * 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'. * - * Provisions or registers a Service Fabric application type with the cluster. - * This is required before any new applications can be instantiated. * - * @param {object} applicationTypeImageStorePath The relative path for the - * application package in the image store specified during the prior copy - * operation. + * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. * - * @param {string} applicationTypeImageStorePath.applicationTypeBuildPath The - * relative image store path to the application package. + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async 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. + * + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4561,9 +5191,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - provisionApplicationType(applicationTypeImageStorePath: models.ApplicationTypeImageStorePath, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - provisionApplicationType(applicationTypeImageStorePath: models.ApplicationTypeImageStorePath, callback: ServiceCallback): void; - provisionApplicationType(applicationTypeImageStorePath: models.ApplicationTypeImageStorePath, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam: models.ProvisionApplicationTypeDescriptionBase, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam: models.ProvisionApplicationTypeDescriptionBase, callback: ServiceCallback): void; + provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam: models.ProvisionApplicationTypeDescriptionBase, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4571,24 +5201,34 @@ declare class ServiceFabricClient extends ServiceClient { * cluster. * * Removes or unregisters a Service Fabric application type from the cluster. - * This operation can only be performed if all application instance of the + * This operation can only be performed if all application instances of the * application type has been deleted. Once the application type is - * unregistered, no new application instance can be created for this particular - * application type. + * unregistered, no new application instances can be created for this + * particular application type. * * @param {string} applicationTypeName The name of the application type. * - * @param {object} applicationTypeImageStoreVersion The version of the - * application type in the image store. + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. + * + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. * - * @param {string} applicationTypeImageStoreVersion.applicationTypeVersion + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] 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 to set it to true + * for large application packages that were provisioned. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4599,31 +5239,41 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName: string, applicationTypeImageStoreVersion: models.ApplicationTypeImageStoreVersion, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName: string, unprovisionApplicationTypeDescriptionInfo: models.UnprovisionApplicationTypeDescriptionInfo, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Removes or unregisters a Service Fabric application type from the * cluster. * * Removes or unregisters a Service Fabric application type from the cluster. - * This operation can only be performed if all application instance of the + * This operation can only be performed if all application instances of the * application type has been deleted. Once the application type is - * unregistered, no new application instance can be created for this particular - * application type. + * unregistered, no new application instances can be created for this + * particular application type. * * @param {string} applicationTypeName The name of the application type. * - * @param {object} applicationTypeImageStoreVersion The version of the - * application type in the image store. + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. * - * @param {string} applicationTypeImageStoreVersion.applicationTypeVersion + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. + * + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] 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 to set it to true + * for large application packages that were provisioned. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4649,9 +5299,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - unprovisionApplicationType(applicationTypeName: string, applicationTypeImageStoreVersion: models.ApplicationTypeImageStoreVersion, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - unprovisionApplicationType(applicationTypeName: string, applicationTypeImageStoreVersion: models.ApplicationTypeImageStoreVersion, callback: ServiceCallback): void; - unprovisionApplicationType(applicationTypeName: string, applicationTypeImageStoreVersion: models.ApplicationTypeImageStoreVersion, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + unprovisionApplicationType(applicationTypeName: string, unprovisionApplicationTypeDescriptionInfo: models.UnprovisionApplicationTypeDescriptionInfo, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + unprovisionApplicationType(applicationTypeName: string, unprovisionApplicationTypeDescriptionInfo: models.UnprovisionApplicationTypeDescriptionInfo, callback: ServiceCallback): void; + unprovisionApplicationType(applicationTypeName: string, unprovisionApplicationTypeDescriptionInfo: models.UnprovisionApplicationTypeDescriptionInfo, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4660,9 +5310,7 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the list containing the information about service types that are * supported by a provisioned application type in a Service Fabric cluster. The - * response includes the name of the service type, the name and version of the - * service manifest the type is defined in, kind (stateless or stateless) of - * the service type and other information about it. + * provided application type must exist. Otherwise, a 404 status is returned. * * @param {string} applicationTypeName The name of the application type. * @@ -4671,9 +5319,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4692,9 +5340,7 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the list containing the information about service types that are * supported by a provisioned application type in a Service Fabric cluster. The - * response includes the name of the service type, the name and version of the - * service manifest the type is defined in, kind (stateless or stateless) of - * the service type and other information about it. + * provided application type must exist. Otherwise, a 404 status is returned. * * @param {string} applicationTypeName The name of the application type. * @@ -4703,9 +5349,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4736,6 +5382,95 @@ declare class ServiceFabricClient extends ServiceClient { getServiceTypeInfoList(applicationTypeName: string, applicationTypeVersion: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary 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 specificed service type is not found in the + * cluster. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getServiceTypeInfoByNameWithHttpOperationResponse(applicationTypeName: string, applicationTypeVersion: string, serviceTypeName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 specificed service type is not found in the + * cluster. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ServiceTypeInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ServiceTypeInfo} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeInfo} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceTypeInfoByName(applicationTypeName: string, applicationTypeVersion: string, serviceTypeName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getServiceTypeInfoByName(applicationTypeName: string, applicationTypeVersion: string, serviceTypeName: string, callback: ServiceCallback): void; + getServiceTypeInfoByName(applicationTypeName: string, applicationTypeVersion: string, serviceTypeName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Gets the manifest describing a service type. * @@ -4752,9 +5487,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4783,9 +5518,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4824,17 +5559,19 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * package that registered it and activation ID of the service package. * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -4843,9 +5580,9 @@ declare class ServiceFabricClient extends ServiceClient { * types that are defined in this service manifest. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4865,17 +5602,19 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * package that registered it and activation ID of the service package. * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -4884,9 +5623,9 @@ declare class ServiceFabricClient extends ServiceClient { * types that are defined in this service manifest. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4924,19 +5663,21 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * 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. + * the activation ID. * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -4948,9 +5689,9 @@ declare class ServiceFabricClient extends ServiceClient { * types that are defined in this service manifest. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4970,19 +5711,21 @@ declare class ServiceFabricClient extends ServiceClient { * 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. + * 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. + * the activation ID. * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -4994,9 +5737,9 @@ declare class ServiceFabricClient extends ServiceClient { * types that are defined in this service manifest. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5035,15 +5778,28 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} applicationDescription Description for creating an * application. * - * @param {string} applicationDescription.name + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. * - * @param {string} applicationDescription.typeName + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. * - * @param {string} applicationDescription.typeVersion + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {array} [applicationDescription.parameterList] + * @param {object} [applicationDescription.applicationCapacity] 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 {object} [applicationDescription.applicationCapacity] * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * The minimum number of nodes where Service Fabric will reserve capacity for @@ -5060,14 +5816,15 @@ declare class ServiceFabricClient extends ServiceClient { * node. * * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5088,15 +5845,28 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} applicationDescription Description for creating an * application. * - * @param {string} applicationDescription.name + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. * - * @param {string} applicationDescription.typeName + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. * - * @param {string} applicationDescription.typeVersion + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {array} [applicationDescription.parameterList] + * @param {object} [applicationDescription.applicationCapacity] 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 {object} [applicationDescription.applicationCapacity] * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * The minimum number of nodes where Service Fabric will reserve capacity for @@ -5113,14 +5883,15 @@ declare class ServiceFabricClient extends ServiceClient { * node. * * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5156,20 +5927,22 @@ declare class ServiceFabricClient extends ServiceClient { * * 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 + * 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 service is having issues closing the replica gracefully, - * the delete operation may take a long time or get stuck. Use the optional - * ForceRemove flag to skip the graceful close sequence and forcefully delete - * the application and all of the its services. + * service. However, if a service is having issues closing the replica + * gracefully, the delete operation may take a long time or get stuck. Use the + * optional ForceRemove flag to skip the graceful close sequence and forcefully + * delete the application and all of the its services. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -5179,9 +5952,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5199,20 +5972,22 @@ declare class ServiceFabricClient extends ServiceClient { * * 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 + * 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 service is having issues closing the replica gracefully, - * the delete operation may take a long time or get stuck. Use the optional - * ForceRemove flag to skip the graceful close sequence and forcefully delete - * the application and all of the its services. + * service. However, if a service is having issues closing the replica + * gracefully, the delete operation may take a long time or get stuck. Use the + * optional ForceRemove flag to skip the graceful close sequence and forcefully + * delete the application and all of the its services. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -5222,9 +5997,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5261,22 +6036,25 @@ declare class ServiceFabricClient extends ServiceClient { * 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 app is occupying - * currently, and application load metric information about the application. + * minimum nodes, maximum nodes, the number of nodes the application is + * occupying currently, and application load metric information about the + * application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5295,22 +6073,25 @@ declare class ServiceFabricClient extends ServiceClient { * 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 app is occupying - * currently, and application load metric information about the application. + * minimum nodes, maximum nodes, the number of nodes the application is + * occupying currently, and application load metric information about the + * application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5344,21 +6125,23 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the list of applications created in the Service Fabric cluster - * that match filters specified as the parameter. + * 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 filters - * specified as the parameter. 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. + * 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 {object} [options] Optional Parameters. * * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind for application query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationDefinitionKind value. The value is 0. + * 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 @@ -5383,39 +6166,49 @@ declare class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getApplicationInfoListWithHttpOperationResponse(options?: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getApplicationInfoListWithHttpOperationResponse(options?: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the list of applications created in the Service Fabric cluster - * that match filters specified as the parameter. + * 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 filters - * specified as the parameter. 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. + * 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 {object} [options] Optional Parameters. * * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind for application query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationDefinitionKind value. The value is 0. + * 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 @@ -5440,10 +6233,18 @@ declare class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5471,9 +6272,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationInfoList(options?: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationInfoList(options?: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; getApplicationInfoList(callback: ServiceCallback): void; - getApplicationInfoList(options: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getApplicationInfoList(options: { applicationDefinitionKindFilter? : number, applicationTypeName? : string, excludeApplicationParameters? : boolean, continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -5487,19 +6288,21 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5523,19 +6326,21 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5572,15 +6377,17 @@ declare class ServiceFabricClient extends ServiceClient { * * 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 helath store, it will return Error. + * in the health store, it will return Error. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -5612,7 +6419,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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.\ + * 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 @@ -5665,9 +6472,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5685,15 +6492,17 @@ declare class ServiceFabricClient extends ServiceClient { * * 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 helath store, it will return Error. + * in the health store, it will return Error. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -5725,7 +6534,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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.\ + * 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 @@ -5778,9 +6587,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5824,10 +6633,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -5859,7 +6670,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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.\ + * 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 @@ -5936,7 +6747,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -5985,11 +6797,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6014,10 +6828,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -6049,7 +6865,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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.\ + * 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 @@ -6126,7 +6942,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -6175,11 +6992,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6230,10 +7049,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -6258,11 +7079,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -6297,7 +7120,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -6314,15 +7137,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -6331,9 +7154,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6365,10 +7188,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -6393,11 +7218,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -6432,7 +7259,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -6449,15 +7276,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -6466,9 +7293,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6508,53 +7335,102 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application * upgrade. * - * @param {string} applicationUpgradeDescription.name + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. * * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. * - * @param {array} applicationUpgradeDescription.parameters + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {string} applicationUpgradeDescription.upgradeKind Possible values - * include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [applicationUpgradeDescription.forceRestart] + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -6576,6 +7452,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -6625,13 +7502,15 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6653,53 +7532,102 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application * upgrade. * - * @param {string} applicationUpgradeDescription.name + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. * * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. * - * @param {array} applicationUpgradeDescription.parameters + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {string} applicationUpgradeDescription.upgradeKind Possible values - * include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [applicationUpgradeDescription.forceRestart] + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -6721,6 +7649,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -6770,13 +7699,15 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6816,16 +7747,18 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6847,16 +7780,18 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6901,20 +7836,27 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * - * @param {string} applicationUpgradeUpdateDescription.name + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] @@ -6936,6 +7878,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -6985,45 +7928,87 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). * * @param {number} * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] 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' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7048,20 +8033,27 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * - * @param {string} applicationUpgradeUpdateDescription.name + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] @@ -7083,6 +8075,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -7132,45 +8125,87 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). * * @param {number} * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] 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' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7212,10 +8247,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -7225,9 +8262,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7251,10 +8288,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -7264,9 +8303,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7304,22 +8343,24 @@ declare class ServiceFabricClient extends ServiceClient { * Starts rolling back the current application upgrade to the previous version. * This API can only be used to rollback 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 + * upgraded use StartApplicationUpgrade API to upgrade it to desired version, * including rolling back to a previous version. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7339,22 +8380,24 @@ declare class ServiceFabricClient extends ServiceClient { * Starts rolling back the current application upgrade to the previous version. * This API can only be used to rollback 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 + * upgraded use StartApplicationUpgrade API to upgrade it to desired version, * including rolling back to a previous version. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7388,41 +8431,105 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the list of applications deployed on a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getDeployedApplicationInfoListWithHttpOperationResponse(nodeName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getDeployedApplicationInfoListWithHttpOperationResponse(nodeName: string, options?: { timeout? : number, includeHealthState? : boolean, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the list of applications deployed on a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7434,7 +8541,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {PagedDeployedApplicationInfoList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7442,15 +8549,17 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {PagedDeployedApplicationInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedDeployedApplicationInfoList} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationInfoList(nodeName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getDeployedApplicationInfoList(nodeName: string, callback: ServiceCallback): void; - getDeployedApplicationInfoList(nodeName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getDeployedApplicationInfoList(nodeName: string, options?: { timeout? : number, includeHealthState? : boolean, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getDeployedApplicationInfoList(nodeName: string, callback: ServiceCallback): void; + getDeployedApplicationInfoList(nodeName: string, options: { timeout? : number, includeHealthState? : boolean, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7458,22 +8567,40 @@ declare class ServiceFabricClient extends ServiceClient { * Fabric node. * * Gets the information about an application deployed on a Service Fabric node. + * This query returns system application information if the application ID + * provided is for system application. Results encompass deployed applications + * in active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the + * cluster. + * * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7484,29 +8611,47 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getDeployedApplicationInfoWithHttpOperationResponse(nodeName: string, applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getDeployedApplicationInfoWithHttpOperationResponse(nodeName: string, applicationId: string, options?: { timeout? : number, includeHealthState? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the information about an application deployed on a Service * Fabric node. * * Gets the information about an application deployed on a Service Fabric node. + * This query returns system application information if the application ID + * provided is for system application. Results encompass deployed applications + * in active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the + * cluster. + * * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7534,9 +8679,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationInfo(nodeName: string, applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getDeployedApplicationInfo(nodeName: string, applicationId: string, options?: { timeout? : number, includeHealthState? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; getDeployedApplicationInfo(nodeName: string, applicationId: string, callback: ServiceCallback): void; - getDeployedApplicationInfo(nodeName: string, applicationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getDeployedApplicationInfo(nodeName: string, applicationId: string, options: { timeout? : number, includeHealthState? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -7554,10 +8699,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -7618,9 +8765,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7648,10 +8795,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -7712,9 +8861,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7768,10 +8917,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -7849,7 +9000,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -7898,6 +9050,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -7907,9 +9061,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7943,10 +9097,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8024,7 +9180,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -8073,6 +9230,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -8082,9 +9241,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8140,10 +9299,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -8168,11 +9329,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -8207,7 +9370,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -8224,15 +9387,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -8241,9 +9404,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8279,10 +9442,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -8307,11 +9472,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -8346,7 +9513,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -8363,15 +9530,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -8380,9 +9547,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8426,9 +9593,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8454,9 +9621,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8499,10 +9666,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -8517,9 +9686,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8542,10 +9711,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -8560,9 +9731,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8595,32 +9766,36 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Gets the information about the specific service belonging to a + * @summary Gets the information about the specific service belonging to the * Service Fabric application. * - * Returns the information about specified service belonging to the specified - * Service Fabric application. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8634,32 +9809,36 @@ declare class ServiceFabricClient extends ServiceClient { getServiceInfoWithHttpOperationResponse(applicationId: string, serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the information about the specific service belonging to a + * @summary Gets the information about the specific service belonging to the * Service Fabric application. * - * Returns the information about specified service belonging to the specified - * Service Fabric application. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8694,22 +9873,25 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the name of the Service Fabric application for a service. * - * The GetApplicationName endpoint returns the name of the application for the - * specified 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8725,22 +9907,25 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the name of the Service Fabric application for a service. * - * The GetApplicationName endpoint returns the name of the application for the - * specified 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8773,29 +9958,41 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Creates the specified service. + * @summary Creates the specified Service Fabric service. * - * Creates the specified 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceDescription The information necessary to create a * service. * - * @param {string} [serviceDescription.applicationName] + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceName + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceTypeName + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * - * @param {array} [serviceDescription.initializationData] + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {object} serviceDescription.partitionDescription + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * * @param {string} serviceDescription.partitionDescription.partitionScheme * Polymorphic Discriminator @@ -8806,33 +10003,40 @@ declare class ServiceFabricClient extends ServiceClient { * based on the service requirements. For example, to place a service on nodes * where NodeType is blue specify the following: "NodeColor == blue)". * - * @param {array} [serviceDescription.correlationScheme] + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceDescription.serviceLoadMetrics] + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * - * @param {array} [serviceDescription.servicePlacementPolicies] + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {string} [serviceDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' * * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates * if the DefaultMoveCost property is specified. * - * @param {string} [serviceDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceDescription.serviceDnsName] The DNS name of the * service. It requires the DNS system service to be enabled in Service Fabric * cluster. * + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. + * * @param {string} serviceDescription.serviceKind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8846,29 +10050,41 @@ declare class ServiceFabricClient extends ServiceClient { createServiceWithHttpOperationResponse(applicationId: string, serviceDescription: models.ServiceDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Creates the specified service. + * @summary Creates the specified Service Fabric service. * - * Creates the specified 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceDescription The information necessary to create a * service. * - * @param {string} [serviceDescription.applicationName] + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceName + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceTypeName + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * - * @param {array} [serviceDescription.initializationData] + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {object} serviceDescription.partitionDescription + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * * @param {string} serviceDescription.partitionDescription.partitionScheme * Polymorphic Discriminator @@ -8879,33 +10095,40 @@ declare class ServiceFabricClient extends ServiceClient { * based on the service requirements. For example, to place a service on nodes * where NodeType is blue specify the following: "NodeColor == blue)". * - * @param {array} [serviceDescription.correlationScheme] + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceDescription.serviceLoadMetrics] + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * - * @param {array} [serviceDescription.servicePlacementPolicies] + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {string} [serviceDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' * * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates * if the DefaultMoveCost property is specified. * - * @param {string} [serviceDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceDescription.serviceDnsName] The DNS name of the * service. It requires the DNS system service to be enabled in Service Fabric * cluster. * + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. + * * @param {string} serviceDescription.serviceKind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8937,33 +10160,42 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Creates a Service Fabric service from the service template defined - * in the application manifest. + * @summary Creates a Service Fabric service from the service template. * * Creates a Service Fabric service from the service template defined in the - * application manifest. + * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * - * @param {string} serviceFromTemplateDescription.applicationName + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceName + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceTypeName + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. * - * @param {array} [serviceFromTemplateDescription.initializationData] + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. * * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name * of the service. It requires the DNS system service to be enabled in Service @@ -8972,9 +10204,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8988,33 +10220,42 @@ declare class ServiceFabricClient extends ServiceClient { createServiceFromTemplateWithHttpOperationResponse(applicationId: string, serviceFromTemplateDescription: models.ServiceFromTemplateDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Creates a Service Fabric service from the service template defined - * in the application manifest. + * @summary Creates a Service Fabric service from the service template. * * Creates a Service Fabric service from the service template defined in the - * application manifest. + * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * - * @param {string} serviceFromTemplateDescription.applicationName + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceName + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceTypeName + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. * - * @param {array} [serviceFromTemplateDescription.initializationData] + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. * * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name * of the service. It requires the DNS system service to be enabled in Service @@ -9023,9 +10264,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9060,19 +10301,21 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Deletes an existing Service Fabric service. * * Deletes an existing Service Fabric service. A service must be created before - * it can be deleted. By default Service Fabric will try to close service - * replicas in a graceful manner and then delete the service. However if + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -9082,9 +10325,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9101,19 +10344,21 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Deletes an existing Service Fabric service. * * Deletes an existing Service Fabric service. A service must be created before - * it can be deleted. By default Service Fabric will try to close service - * replicas in a graceful manner and then delete the service. However if + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -9123,9 +10368,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9157,17 +10402,28 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Updates the specified service using the given update description. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Updates the specified service using the given 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. Please 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -9202,6 +10458,8 @@ declare class ServiceFabricClient extends ServiceClient { * 256. * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. * * * @param {string} [serviceUpdateDescription.placementConstraints] The @@ -9211,14 +10469,20 @@ declare class ServiceFabricClient extends ServiceClient { * service on nodes where NodeType is blue specify the following: "NodeColor == * blue)". * - * @param {array} [serviceUpdateDescription.correlationScheme] + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceUpdateDescription.loadMetrics] + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. * * @param {string} serviceUpdateDescription.serviceKind Polymorphic * Discriminator @@ -9226,9 +10490,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9242,17 +10506,28 @@ declare class ServiceFabricClient extends ServiceClient { updateServiceWithHttpOperationResponse(serviceId: string, serviceUpdateDescription: models.ServiceUpdateDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Updates the specified service using the given update description. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Updates the specified service using the given 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. Please 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -9287,6 +10562,8 @@ declare class ServiceFabricClient extends ServiceClient { * 256. * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. * * * @param {string} [serviceUpdateDescription.placementConstraints] The @@ -9296,14 +10573,20 @@ declare class ServiceFabricClient extends ServiceClient { * service on nodes where NodeType is blue specify the following: "NodeColor == * blue)". * - * @param {array} [serviceUpdateDescription.correlationScheme] + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceUpdateDescription.loadMetrics] + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. * * @param {string} serviceUpdateDescription.serviceKind Polymorphic * Discriminator @@ -9311,9 +10594,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9351,18 +10634,20 @@ declare class ServiceFabricClient extends ServiceClient { * be created before its description can be obtained. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9382,18 +10667,20 @@ declare class ServiceFabricClient extends ServiceClient { * be created before its description can be obtained. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9434,16 +10721,18 @@ declare class ServiceFabricClient extends ServiceClient { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -9503,9 +10792,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9527,16 +10816,18 @@ declare class ServiceFabricClient extends ServiceClient { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -9596,9 +10887,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9645,16 +10936,18 @@ declare class ServiceFabricClient extends ServiceClient { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -9731,7 +11024,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -9780,6 +11074,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -9789,9 +11085,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9819,16 +11115,18 @@ declare class ServiceFabricClient extends ServiceClient { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -9905,7 +11203,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -9954,6 +11253,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -9963,9 +11264,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10015,12 +11316,14 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} healthInformation 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. @@ -10045,11 +11348,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -10084,7 +11389,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -10101,15 +11406,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -10118,9 +11423,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10151,12 +11456,14 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} healthInformation 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. @@ -10181,11 +11488,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -10220,7 +11529,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -10237,15 +11546,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -10254,9 +11563,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10290,30 +11599,32 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Resolve a Service Fabric partition. * - * Resolve a Service Fabric service partition, to get the endpoints of the + * Resolve a Service Fabric service partition to get the endpoints of the * service replicas. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] 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 the PartitionKeyValue parameter is not + * - 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 the PartitionKeyValue parameter is an + * - 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 the PartitionKeyValue parameter is a name - * of the partition. This is valid for the partitions with partitioning scheme - * as Named. The value is 3. + * - 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. * * * @param {string} [options.partitionKeyValue] Partition key. This is required @@ -10324,9 +11635,9 @@ declare class ServiceFabricClient extends ServiceClient { * knows that the result that was got previously is stale. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10342,30 +11653,32 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Resolve a Service Fabric partition. * - * Resolve a Service Fabric service partition, to get the endpoints of the + * Resolve a Service Fabric service partition to get the endpoints of the * service replicas. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] 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 the PartitionKeyValue parameter is not + * - 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 the PartitionKeyValue parameter is an + * - 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 the PartitionKeyValue parameter is a name - * of the partition. This is valid for the partitions with partitioning scheme - * as Named. The value is 3. + * - 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. * * * @param {string} [options.partitionKeyValue] Partition key. This is required @@ -10376,9 +11689,9 @@ declare class ServiceFabricClient extends ServiceClient { * knows that the result that was got previously is stale. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10415,16 +11728,18 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Gets the list of partitions of a Service Fabric service. * * Gets the list of partitions of a Service Fabric service. The response - * include the partition id, partitioning scheme information, keys supported by - * the partition, status, health and other details about the partition. + * includes the partition ID, partitioning scheme information, keys supported + * by the partition, status, health, and other details about the partition. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -10436,9 +11751,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10455,16 +11770,18 @@ declare class ServiceFabricClient extends ServiceClient { * @summary Gets the list of partitions of a Service Fabric service. * * Gets the list of partitions of a Service Fabric service. The response - * include the partition id, partitioning scheme information, keys supported by - * the partition, status, health and other details about the partition. + * includes the partition ID, partitioning scheme information, keys supported + * by the partition, status, health, and other details about the partition. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -10476,9 +11793,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10514,19 +11831,18 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the information about a Service Fabric partition. * - * The Partitions endpoint returns information about the specified partition. - * The response include the partition id, partitioning scheme information, keys - * supported by the partition, status, health and other details about the - * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10542,19 +11858,18 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the information about a Service Fabric partition. * - * The Partitions endpoint returns information about the specified partition. - * The response include the partition id, partitioning scheme information, keys - * supported by the partition, status, health and other details about the - * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10589,17 +11904,17 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the name of the Service Fabric service for a partition. * - * The GetServiceName endpoint returns the name of the service for the - * specified 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10615,17 +11930,17 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the name of the Service Fabric service for a partition. * - * The GetServiceName endpoint returns the name of the service for the - * specified 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10666,7 +11981,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -10729,9 +12044,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10753,7 +12068,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -10816,9 +12131,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10866,7 +12181,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -10946,7 +12261,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -10995,6 +12311,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -11004,9 +12322,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11035,7 +12353,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -11115,7 +12433,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -11164,6 +12483,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -11173,9 +12494,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11250,11 +12571,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -11289,7 +12612,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -11306,15 +12629,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -11323,9 +12646,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11381,11 +12704,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -11420,7 +12745,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -11437,15 +12762,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -11454,9 +12779,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11488,11 +12813,12 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Gets the load of the specified Service Fabric partition. + * @summary Gets the load information of the specified Service Fabric + * partition. * - * Returns information about the specified partition. - * The response includes a list of load information. - * Each information includes load metric name, value and last reported time in + * 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. * * @@ -11501,9 +12827,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11517,11 +12843,12 @@ declare class ServiceFabricClient extends ServiceClient { getPartitionLoadInformationWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the load of the specified Service Fabric partition. + * @summary Gets the load information of the specified Service Fabric + * partition. * - * Returns information about the specified partition. - * The response includes a list of load information. - * Each information includes load metric name, value and last reported time in + * 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. * * @@ -11530,9 +12857,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11576,9 +12903,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11602,9 +12929,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11650,9 +12977,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11680,9 +13007,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11724,18 +13051,20 @@ declare class ServiceFabricClient extends ServiceClient { * loss. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11759,18 +13088,20 @@ declare class ServiceFabricClient extends ServiceClient { * loss. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11814,9 +13145,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11842,9 +13173,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11889,9 +13220,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11918,9 +13249,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11993,25 +13324,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -12024,7 +13339,11 @@ declare class ServiceFabricClient extends ServiceClient { * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -12034,29 +13353,19 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -12070,7 +13379,10 @@ declare class ServiceFabricClient extends ServiceClient { * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -12105,11 +13417,15 @@ declare class ServiceFabricClient extends ServiceClient { * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -12174,25 +13490,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -12205,7 +13505,11 @@ declare class ServiceFabricClient extends ServiceClient { * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -12215,29 +13519,19 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -12251,7 +13545,10 @@ declare class ServiceFabricClient extends ServiceClient { * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -12286,11 +13583,15 @@ declare class ServiceFabricClient extends ServiceClient { * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -12348,12 +13649,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTaskCancelDescription.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. + * zero, then no version check is performed. * * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * not yet started. * * @param {object} [options] Optional Parameters. * @@ -12384,12 +13685,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTaskCancelDescription.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. + * zero, then no version check is performed. * * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * not yet started. * * @param {object} [options] Optional Parameters. * @@ -12611,7 +13912,7 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTaskApproveDescription.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. + * zero, then no version check is performed. * * @param {object} [options] Optional Parameters. * @@ -12642,7 +13943,7 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTaskApproveDescription.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. + * zero, then no version check is performed. * * @param {object} [options] Optional Parameters. * @@ -12809,25 +14110,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -12840,7 +14125,11 @@ declare class ServiceFabricClient extends ServiceClient { * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -12850,29 +14139,19 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -12886,7 +14165,10 @@ declare class ServiceFabricClient extends ServiceClient { * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -12921,11 +14203,15 @@ declare class ServiceFabricClient extends ServiceClient { * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -12976,25 +14262,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -13007,7 +14277,11 @@ declare class ServiceFabricClient extends ServiceClient { * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -13017,29 +14291,19 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -13053,7 +14317,10 @@ declare class ServiceFabricClient extends ServiceClient { * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -13088,11 +14355,15 @@ declare class ServiceFabricClient extends ServiceClient { * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -13139,8 +14410,8 @@ declare class ServiceFabricClient extends ServiceClient { * partition. * * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The respons include the id, role, status, health, node - * name, uptime, and other details about the replica. + * specified partition. The response includes the id, role, status, health, + * node name, uptime, and other details about the replica. * * @param {uuid} partitionId The identity of the partition. * @@ -13155,9 +14426,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13175,8 +14446,8 @@ declare class ServiceFabricClient extends ServiceClient { * partition. * * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The respons include the id, role, status, health, node - * name, uptime, and other details about the replica. + * specified partition. The response includes the id, role, status, health, + * node name, uptime, and other details about the replica. * * @param {uuid} partitionId The identity of the partition. * @@ -13191,9 +14462,9 @@ declare class ServiceFabricClient extends ServiceClient { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13228,7 +14499,7 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Gets the information about a replica of a Service Fabric partition. * - * The respons include the id, role, status, health, node name, uptime, and + * The response includes the id, role, status, health, node name, uptime, and * other details about the replica. * * @param {uuid} partitionId The identity of the partition. @@ -13237,18 +14508,10 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13259,12 +14522,12 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getReplicaInfoWithHttpOperationResponse(partitionId: string, replicaId: string, options?: { continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getReplicaInfoWithHttpOperationResponse(partitionId: string, replicaId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the information about a replica of a Service Fabric partition. * - * The respons include the id, role, status, health, node name, uptime, and + * The response includes the id, role, status, health, node name, uptime, and * other details about the replica. * * @param {uuid} partitionId The identity of the partition. @@ -13273,18 +14536,10 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13311,9 +14566,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaInfo(partitionId: string, replicaId: string, options?: { continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getReplicaInfo(partitionId: string, replicaId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; getReplicaInfo(partitionId: string, replicaId: string, callback: ServiceCallback): void; - getReplicaInfo(partitionId: string, replicaId: string, options: { continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getReplicaInfo(partitionId: string, replicaId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13356,9 +14611,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13411,9 +14666,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13514,7 +14769,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -13563,11 +14819,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13649,7 +14907,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -13698,11 +14957,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13755,14 +15016,9 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {string} replicaId The identifier of the replica. * - * @param {string} serviceKind The kind of service replica (Stateless or - * Stateful) for which the health is being reported. Following are the possible - * values. - * - Stateless - Does not use Service Fabric to make its state highly available - * or reliable. The value is 1 - * - Stateful - Uses Service Fabric to make its state or part of its state - * highly available and reliable. The value is 2. - * . Possible values include: 'Stateless', 'Stateful' + * @param {string} replicaHealthReportServiceKind 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' * * @param {object} healthInformation Describes the health information for the * health report. This information needs to be present in all of the health @@ -13788,11 +15044,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -13827,7 +15085,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -13844,15 +15102,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -13861,9 +15119,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13874,7 +15132,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - reportReplicaHealthWithHttpOperationResponse(partitionId: string, replicaId: string, serviceKind: string, healthInformation: models.HealthInformation, options?: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + reportReplicaHealthWithHttpOperationResponse(partitionId: string, replicaId: string, replicaHealthReportServiceKind: string, healthInformation: models.HealthInformation, options?: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Sends a health report on the Service Fabric replica. @@ -13897,14 +15155,9 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {string} replicaId The identifier of the replica. * - * @param {string} serviceKind The kind of service replica (Stateless or - * Stateful) for which the health is being reported. Following are the possible - * values. - * - Stateless - Does not use Service Fabric to make its state highly available - * or reliable. The value is 1 - * - Stateful - Uses Service Fabric to make its state or part of its state - * highly available and reliable. The value is 2. - * . Possible values include: 'Stateless', 'Stateful' + * @param {string} replicaHealthReportServiceKind 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' * * @param {object} healthInformation Describes the health information for the * health report. This information needs to be present in all of the health @@ -13930,11 +15183,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -13969,7 +15224,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -13986,15 +15241,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -14003,9 +15258,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14031,17 +15286,17 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reportReplicaHealth(partitionId: string, replicaId: string, serviceKind: string, healthInformation: models.HealthInformation, options?: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - reportReplicaHealth(partitionId: string, replicaId: string, serviceKind: string, healthInformation: models.HealthInformation, callback: ServiceCallback): void; - reportReplicaHealth(partitionId: string, replicaId: string, serviceKind: string, healthInformation: models.HealthInformation, options: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reportReplicaHealth(partitionId: string, replicaId: string, replicaHealthReportServiceKind: string, healthInformation: models.HealthInformation, options?: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + reportReplicaHealth(partitionId: string, replicaId: string, replicaHealthReportServiceKind: string, healthInformation: models.HealthInformation, callback: ServiceCallback): void; + reportReplicaHealth(partitionId: string, replicaId: string, replicaHealthReportServiceKind: string, healthInformation: models.HealthInformation, options: { immediate? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * @summary 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 + * 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. @@ -14051,10 +15306,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -14063,9 +15320,9 @@ declare class ServiceFabricClient extends ServiceClient { * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14082,8 +15339,8 @@ declare class ServiceFabricClient extends ServiceClient { * @summary 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 + * 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. @@ -14093,10 +15350,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -14105,9 +15364,9 @@ declare class ServiceFabricClient extends ServiceClient { * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14143,8 +15402,8 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -14155,9 +15414,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14175,8 +15434,8 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -14187,9 +15446,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14227,8 +15486,8 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -14237,9 +15496,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14257,8 +15516,8 @@ declare class ServiceFabricClient extends ServiceClient { * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -14267,9 +15526,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14319,9 +15578,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14351,9 +15610,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14412,9 +15671,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14455,9 +15714,9 @@ declare class ServiceFabricClient extends ServiceClient { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14500,16 +15759,18 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14534,16 +15795,18 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14588,18 +15851,20 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14626,18 +15891,20 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14682,10 +15949,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -14715,9 +15984,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14744,10 +16013,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -14777,9 +16048,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14832,10 +16103,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -14889,7 +16162,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -14938,11 +16212,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14975,10 +16251,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -15032,7 +16310,8 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -15081,11 +16360,13 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15141,10 +16422,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -15171,11 +16454,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -15210,7 +16495,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -15227,15 +16512,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -15244,9 +16529,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15282,10 +16567,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -15312,11 +16599,13 @@ declare class ServiceFabricClient extends ServiceClient { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -15351,7 +16640,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -15368,15 +16657,15 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. + * 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 + * 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 + * 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 @@ -15385,9 +16674,9 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15419,11 +16708,15 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Downloads packages associated with specified service manifest to - * image cache on specified node. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * Downloads packages associated with specified service manifest to image cache - * on 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 {string} nodeName The name of the node. @@ -15432,21 +16725,26 @@ declare class ServiceFabricClient extends ServiceClient { * for deploying a service package to a Service Fabric node. * * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. * * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. * * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. * - * @param {string} deployServicePackageToNodeDescription.nodeName + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. * * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15457,14 +16755,18 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - deployedServicePackageToNodeWithHttpOperationResponse(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + deployServicePackageToNodeWithHttpOperationResponse(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Downloads packages associated with specified service manifest to - * image cache on specified node. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * Downloads packages associated with specified service manifest to image cache - * on 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 {string} nodeName The name of the node. @@ -15473,21 +16775,26 @@ declare class ServiceFabricClient extends ServiceClient { * for deploying a service package to a Service Fabric node. * * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. * * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. * * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. * - * @param {string} deployServicePackageToNodeDescription.nodeName + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. * * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15513,9 +16820,9 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deployedServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - deployedServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, callback: ServiceCallback): void; - deployedServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deployServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + deployServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, callback: ServiceCallback): void; + deployServicePackageToNode(nodeName: string, deployServicePackageToNodeDescription: models.DeployServicePackageToNodeDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15529,10 +16836,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -15543,9 +16852,9 @@ declare class ServiceFabricClient extends ServiceClient { * Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15569,10 +16878,12 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -15583,9 +16894,9 @@ declare class ServiceFabricClient extends ServiceClient { * Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15629,28 +16940,49 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. * * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] + * [restartDeployedCodePackageDescription.servicePackageActivationId] 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. * - * @param {string} restartDeployedCodePackageDescription.codePackageName + * + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * 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. + * * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15676,28 +17008,49 @@ declare class ServiceFabricClient extends ServiceClient { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. * * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] + * [restartDeployedCodePackageDescription.servicePackageActivationId] 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. + * * - * @param {string} restartDeployedCodePackageDescription.codePackageName + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * 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. + * * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15729,23 +17082,286 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Creates a Service Fabric compose deployment. + * @summary Gets the container logs for container deployed on a Service Fabric + * node. * - * Creates a Service Fabric compose deployment. + * Gets the container logs for container deployed on a Service Fabric node for + * the given code package. * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. + * @param {string} nodeName The name of the node. * - * @param {string} createComposeDeploymentDescription.deploymentName + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. * - * @param {object} [createComposeDeploymentDescription.registryCredential] + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getContainerLogsDeployedOnNodeWithHttpOperationResponse(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, options?: { tail? : string, previous? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ContainerLogs} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ContainerLogs} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getContainerLogsDeployedOnNode(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, options?: { tail? : string, previous? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getContainerLogsDeployedOnNode(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, callback: ServiceCallback): void; + getContainerLogsDeployedOnNode(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, options: { tail? : string, previous? : boolean, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + invokeContainerApiWithHttpOperationResponse(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, codePackageInstanceId: string, containerApiRequestBody: models.ContainerApiRequestBody, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ContainerApiResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ContainerApiResponse} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerApiResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + invokeContainerApi(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, codePackageInstanceId: string, containerApiRequestBody: models.ContainerApiRequestBody, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + invokeContainerApi(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, codePackageInstanceId: string, containerApiRequestBody: models.ContainerApiRequestBody, callback: ServiceCallback): void; + invokeContainerApi(nodeName: string, applicationId: string, serviceManifestName: string, codePackageName: string, codePackageInstanceId: string, containerApiRequestBody: models.ContainerApiRequestBody, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 it's status can + * be tracked via `GetComposeDeploymentStatus` API. + * + * @param {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. + * + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. + * + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. * * @param {string} * [createComposeDeploymentDescription.registryCredential.registryPassword] The @@ -15758,9 +17374,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15776,17 +17392,22 @@ declare class ServiceFabricClient extends ServiceClient { /** * @summary Creates a Service Fabric compose deployment. * - * 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 it's status can + * be tracked via `GetComposeDeploymentStatus` API. * * @param {object} createComposeDeploymentDescription Describes the compose * deployment that needs to be created. * - * @param {string} createComposeDeploymentDescription.deploymentName + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. * * @param {string} createComposeDeploymentDescription.composeFileContent The * content of the compose file that describes the deployment to create. * * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. * * @param {string} * [createComposeDeploymentDescription.registryCredential.registryUserName] The @@ -15803,9 +17424,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15849,9 +17470,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15877,9 +17498,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15938,13 +17559,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15983,13 +17604,13 @@ declare class ServiceFabricClient extends ServiceClient { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16034,9 +17655,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16061,9 +17682,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16106,9 +17727,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16131,9 +17752,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16176,12 +17797,14 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading * compose deployment. * - * @param {string} composeDeploymentUpgradeDescription.deploymentName + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. * * @param {string} composeDeploymentUpgradeDescription.composeFileContent The * content of the compose file that describes the deployment to create. * * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. * * @param {string} * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] @@ -16195,41 +17818,83 @@ declare class ServiceFabricClient extends ServiceClient { * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] * Indicates that supplied container registry password is encrypted. * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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). * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -16251,6 +17916,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -16300,13 +17966,15 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16331,12 +17999,14 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading * compose deployment. * - * @param {string} composeDeploymentUpgradeDescription.deploymentName + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. * * @param {string} composeDeploymentUpgradeDescription.composeFileContent The * content of the compose file that describes the deployment to create. * * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. * * @param {string} * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] @@ -16350,41 +18020,83 @@ declare class ServiceFabricClient extends ServiceClient { * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] * Indicates that supplied container registry password is encrypted. * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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). * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -16406,6 +18118,7 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -16455,13 +18168,15 @@ declare class ServiceFabricClient extends ServiceClient { * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16492,6 +18207,77 @@ declare class ServiceFabricClient extends ServiceClient { startComposeDeploymentUpgrade(deploymentName: string, composeDeploymentUpgradeDescription: models.ComposeDeploymentUpgradeDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getChaosWithHttpOperationResponse(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Chaos} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Chaos} [result] - The deserialized result object if an error did not occur. + * See {@link Chaos} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getChaos(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getChaos(callback: ServiceCallback): void; + getChaos(options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Starts Chaos in the cluster. * @@ -16548,7 +18334,12 @@ declare class ServiceFabricClient extends ServiceClient { * The larger the value, the lower the fault injection rate. * * - * @param {object} [chaosParameters.clusterHealthPolicy] + * @param {object} [chaosParameters.clusterHealthPolicy] 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. + * * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates @@ -16591,18 +18382,93 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * - * @param {object} [chaosParameters.context] + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * + * + * @param {object} [chaosParameters.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. + * + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * + * @param {object} [chaosParameters.chaosTargetFilter] 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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. * - * @param {object} [chaosParameters.context.map] * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16671,7 +18537,12 @@ declare class ServiceFabricClient extends ServiceClient { * The larger the value, the lower the fault injection rate. * * - * @param {object} [chaosParameters.clusterHealthPolicy] + * @param {object} [chaosParameters.clusterHealthPolicy] 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. + * * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates @@ -16714,18 +18585,93 @@ declare class ServiceFabricClient extends ServiceClient { * * * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * - * @param {object} [chaosParameters.context] + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * + * + * @param {object} [chaosParameters.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. + * + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * + * @param {object} [chaosParameters.chaosTargetFilter] 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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. * - * @param {object} [chaosParameters.context.map] * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16757,18 +18703,23 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Stops Chaos in the cluster if it is already running, otherwise it - * does nothing. + * @summary 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. * - * Stops Chaos from scheduling further faults; but, the in-flight faults are - * not affected. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16782,18 +18733,23 @@ declare class ServiceFabricClient extends ServiceClient { stopChaosWithHttpOperationResponse(options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Stops Chaos in the cluster if it is already running, otherwise it - * does nothing. + * @summary 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. * - * Stops Chaos from scheduling further faults; but, the in-flight faults are - * not affected. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16825,15 +18781,18 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary Gets the next segment of the Chaos report based on the passed-in - * continuation token or the passed-in time-range. + * @summary Gets the next segment of the Chaos events based on the continuation + * token or the time range. * - * You can either specify the ContinuationToken to get the next segment of the - * Chaos report or you can specify the time-range - * through StartTimeUtc and EndTimeUtc, but you cannot specify both the - * ContinuationToken and the time-range in the same call. - * When there are more than 100 Chaos events, the Chaos report is returned in - * segments where a segment contains no more than 100 Chaos events. + * 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 {object} [options] Optional Parameters. @@ -16846,44 +18805,55 @@ declare class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The count of ticks representing the - * start time of the time range for which a Chaos report is to be generated. - * Please consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * - * @param {string} [options.endTimeUtc] The count of ticks representing the end - * time of the time range for which a Chaos report is to be generated. Please - * consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getChaosReportWithHttpOperationResponse(options?: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getChaosEventsWithHttpOperationResponse(options?: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the next segment of the Chaos report based on the passed-in - * continuation token or the passed-in time-range. + * @summary Gets the next segment of the Chaos events based on the continuation + * token or the time range. * - * You can either specify the ContinuationToken to get the next segment of the - * Chaos report or you can specify the time-range - * through StartTimeUtc and EndTimeUtc, but you cannot specify both the - * ContinuationToken and the time-range in the same call. - * When there are more than 100 Chaos events, the Chaos report is returned in - * segments where a segment contains no more than 100 Chaos events. + * 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 {object} [options] Optional Parameters. @@ -16896,22 +18866,30 @@ declare class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The count of ticks representing the - * start time of the time range for which a Chaos report is to be generated. - * Please consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * - * @param {string} [options.endTimeUtc] The count of ticks representing the end - * time of the time range for which a Chaos report is to be generated. Please - * consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16923,7 +18901,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ChaosReport} - The deserialized result object. + * @resolve {ChaosEventsSegment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16931,54 +18909,232 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ChaosReport} [result] - The deserialized result object if an error did not occur. - * See {@link ChaosReport} for more information. + * {ChaosEventsSegment} [result] - The deserialized result object if an error did not occur. + * See {@link ChaosEventsSegment} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getChaosReport(options?: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getChaosReport(callback: ServiceCallback): void; - getChaosReport(options: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getChaosEvents(options?: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getChaosEvents(callback: ServiceCallback): void; + getChaosEvents(options: { continuationToken? : string, startTimeUtc? : string, endTimeUtc? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary 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. + * @summary 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 {string} contentPath Relative path to file or folder in the image - * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - uploadFileWithHttpOperationResponse(contentPath: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getChaosScheduleWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ChaosScheduleDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ChaosScheduleDescription} [result] - The deserialized result object if an error did not occur. + * See {@link ChaosScheduleDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getChaosSchedule(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getChaosSchedule(callback: ServiceCallback): void; + getChaosSchedule(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Set the schedule used by Chaos. + * + * Set the Chaos Schedule currently in use by Chaos. Chaos will automatically + * schedule runs based on the Chaos Schedule. + * The version in the provided input schedule must match the version of the + * Chaos Schedule on the server. + * If the version provided does not match the version on the server, the Chaos + * Schedule is not updated. + * If the version provided matches the version on the server, then the Chaos + * Schedule is updated and the version of the Chaos Schedule on the server is + * incremented up by one and wraps back to 0 after 2,147,483,647. + * If Chaos is running when this call is made, the call will fail. + * + * + * @param {object} chaosSchedule Describes the schedule used by Chaos. + * + * @param {number} [chaosSchedule.version] The version number of the Schedule. + * + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. + * + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. + * + * + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. + * + * + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * + * + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + postChaosScheduleWithHttpOperationResponse(chaosSchedule: models.ChaosScheduleDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Set the schedule used by Chaos. + * + * Set the Chaos Schedule currently in use by Chaos. Chaos will automatically + * schedule runs based on the Chaos Schedule. + * The version in the provided input schedule must match the version of the + * Chaos Schedule on the server. + * If the version provided does not match the version on the server, the Chaos + * Schedule is not updated. + * If the version provided matches the version on the server, then the Chaos + * Schedule is updated and the version of the Chaos Schedule on the server is + * incremented up by one and wraps back to 0 after 2,147,483,647. + * If Chaos is running when this call is made, the call will fail. + * + * + * @param {object} chaosSchedule Describes the schedule used by Chaos. + * + * @param {number} [chaosSchedule.version] The version number of the Schedule. + * + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. + * + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. + * + * + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. + * + * + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * + * + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + postChaosSchedule(chaosSchedule: models.ChaosScheduleDescription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + postChaosSchedule(chaosSchedule: models.ChaosScheduleDescription, callback: ServiceCallback): void; + postChaosSchedule(chaosSchedule: models.ChaosScheduleDescription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + uploadFileWithHttpOperationResponse(contentPath: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Uploads contents of the file to the image store. @@ -16990,7 +19146,7 @@ declare class ServiceFabricClient extends ServiceClient { * 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 + * 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. @@ -17002,9 +19158,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17047,9 +19203,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17074,9 +19230,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17121,9 +19277,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17149,9 +19305,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17191,9 +19347,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17215,9 +19371,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17276,9 +19432,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17318,9 +19474,9 @@ declare class ServiceFabricClient extends ServiceClient { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17352,81 +19508,51 @@ declare class ServiceFabricClient extends ServiceClient { /** - * @summary 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. + * @summary Cancels an image store upload session. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - invokeInfrastructureCommandWithHttpOperationResponse(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteImageStoreUploadSessionWithHttpOperationResponse(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Invokes an administrative command on the given Infrastructure - * Service instance. + * @summary Cancels an image store upload session. * - * 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. + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17438,7 +19564,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17446,93 +19572,67 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {String} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureCommand(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - invokeInfrastructureCommand(command: string, callback: ServiceCallback): void; - invokeInfrastructureCommand(command: string, options: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImageStoreUploadSession(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImageStoreUploadSession(sessionId: string, callback: ServiceCallback): void; + deleteImageStoreUploadSession(sessionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary 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. + * @summary Commit an image store upload session. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * 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 {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - invokeInfrastructureQueryWithHttpOperationResponse(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + commitImageStoreUploadSessionWithHttpOperationResponse(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary 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. + * @summary Commit an image store upload session. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * 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 {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17544,7 +19644,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {String} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17552,71 +19652,207 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {String} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureQuery(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - invokeInfrastructureQuery(command: string, callback: ServiceCallback): void; - invokeInfrastructureQuery(command: string, options: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + commitImageStoreUploadSession(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + commitImageStoreUploadSession(sessionId: string, callback: ServiceCallback): void; + commitImageStoreUploadSession(sessionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary This API will induce data loss for the specified partition. It will - * trigger a call to the OnDataLossAsync API of the partition. + * @summary Get the image store upload session by ID. * - * 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. + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * - * 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. + * @param {uuid} sessionId 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. * - * 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. + * @param {object} [options] Optional Parameters. * - * Call the GetDataLossProgress API with the same OperationId to return - * information on the operation started with this API. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @returns {Promise} A promise is returned * - * @param {uuid} partitionId The identity of the partition. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @reject {Error|ServiceError} - The error object. + */ + getImageStoreUploadSessionByIdWithHttpOperationResponse(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get the image store upload session by ID. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - PartialDataLoss - PartialDataLoss option will cause a quorum of replicas - * to go down, triggering an OnDataLoss event in the system for the given - * partition. - * - FullDataLoss - FullDataLoss option will drop all the replicas which means - * that all the data will be lost. - * . Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. + * + * + * @param {uuid} sessionId 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {UploadSession} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {UploadSession} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getImageStoreUploadSessionById(sessionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getImageStoreUploadSessionById(sessionId: string, callback: ServiceCallback): void; + getImageStoreUploadSessionById(sessionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getImageStoreUploadSessionByPathWithHttpOperationResponse(contentPath: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {UploadSession} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {UploadSession} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getImageStoreUploadSessionByPath(contentPath: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getImageStoreUploadSessionByPath(contentPath: string, callback: ServiceCallback): void; + getImageStoreUploadSessionByPath(contentPath: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {uuid} sessionId 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. + * + * @param {string} contentRange 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17627,62 +19863,5555 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - startDataLossWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + uploadFileChunkWithHttpOperationResponse(contentPath: string, sessionId: string, contentRange: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary This API will induce data loss for the specified partition. It will - * trigger a call to the OnDataLossAsync API of the partition. + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {uuid} sessionId 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. + * + * @param {string} contentRange 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + uploadFileChunk(contentPath: string, sessionId: string, contentRange: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + uploadFileChunk(contentPath: string, sessionId: string, contentRange: string, callback: ServiceCallback): void; + uploadFileChunk(contentPath: string, sessionId: string, contentRange: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + invokeInfrastructureCommandWithHttpOperationResponse(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {String} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {String} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + invokeInfrastructureCommand(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + invokeInfrastructureCommand(command: string, callback: ServiceCallback): void; + invokeInfrastructureCommand(command: string, options: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + invokeInfrastructureQueryWithHttpOperationResponse(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {String} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {String} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + invokeInfrastructureQuery(command: string, options?: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + invokeInfrastructureQuery(command: string, callback: ServiceCallback): void; + invokeInfrastructureQuery(command: string, options: { serviceId? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startDataLossWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, callback: ServiceCallback): void; + startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getDataLossProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PartitionDataLossProgress} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PartitionDataLossProgress} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionDataLossProgress} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getDataLossProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getDataLossProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; + getDataLossProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Induces quorum loss for a given stateful service partition. + * + * Induces quorum loss for a given stateful service partition. This API is + * useful for a temporary quorum loss situation on your service. + * + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startQuorumLossWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Induces quorum loss for a given stateful service partition. + * + * Induces quorum loss for a given stateful service partition. This API is + * useful for a temporary quorum loss situation on your service. + * + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, callback: ServiceCallback): void; + startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getQuorumLossProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PartitionQuorumLossProgress} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PartitionQuorumLossProgress} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionQuorumLossProgress} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; + getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startPartitionRestartWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, callback: ServiceCallback): void; + startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. + * + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. + * + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPartitionRestartProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. + * + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. + * + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PartitionRestartProgress} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PartitionRestartProgress} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionRestartProgress} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; + getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} nodeTransitionType 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' + * + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. + * + * @param {number} stopDurationInSeconds 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startNodeTransitionWithHttpOperationResponse(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} nodeTransitionType 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' + * + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. + * + * @param {number} stopDurationInSeconds 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, callback: ServiceCallback): void; + startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the progress of an operation started using + * StartNodeTransition. + * + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. + * + * + * @param {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getNodeTransitionProgressWithHttpOperationResponse(nodeName: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the progress of an operation started using + * StartNodeTransition. + * + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. + * + * + * @param {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {NodeTransitionProgress} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NodeTransitionProgress} [result] - The deserialized result object if an error did not occur. + * See {@link NodeTransitionProgress} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeTransitionProgress(nodeName: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getNodeTransitionProgress(nodeName: string, operationId: string, callback: ServiceCallback): void; + getNodeTransitionProgress(nodeName: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets a list of user-induced fault operations filtered by provided + * input. + * + * Gets the a list of user-induced fault operations filtered by provided input. + * + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. + * + * + * @param {number} stateFilter 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 + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getFaultOperationListWithHttpOperationResponse(typeFilter: number, stateFilter: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a list of user-induced fault operations filtered by provided + * input. + * + * Gets the a list of user-induced fault operations filtered by provided input. + * + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. + * + * + * @param {number} stateFilter 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 + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getFaultOperationList(typeFilter: number, stateFilter: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getFaultOperationList(typeFilter: number, stateFilter: number, callback: ServiceCallback): void; + getFaultOperationList(typeFilter: number, stateFilter: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Cancels a user-induced fault operation. + * + * The following is a list of APIs that start fault operations that may be + * cancelled using CancelOperation - + * - StartDataLoss + * - StartQuorumLoss + * - StartPartitionRestart + * - StartNodeTransition + * + * 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/is be + * 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 {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {boolean} force Indicates whether to gracefully rollback and clean up + * internal system state modified by executing the user-induced operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + cancelOperationWithHttpOperationResponse(operationId: string, force: boolean, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Cancels a user-induced fault operation. + * + * The following is a list of APIs that start fault operations that may be + * cancelled using CancelOperation - + * - StartDataLoss + * - StartQuorumLoss + * - StartPartitionRestart + * - StartNodeTransition + * + * 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/is be + * 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 {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {boolean} force Indicates whether to gracefully rollback and clean up + * internal system state modified by executing the user-induced operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + cancelOperation(operationId: string, force: boolean, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + cancelOperation(operationId: string, force: boolean, callback: ServiceCallback): void; + cancelOperation(operationId: string, force: boolean, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createBackupPolicyWithHttpOperationResponse(backupPolicyDescription: models.BackupPolicyDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + createBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, callback: ServiceCallback): void; + createBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteBackupPolicyWithHttpOperationResponse(backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteBackupPolicy(backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteBackupPolicy(backupPolicyName: string, callback: ServiceCallback): void; + deleteBackupPolicy(backupPolicyName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all the backup policies configured. + * + * Get a list of all the backup policies configured. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBackupPolicyListWithHttpOperationResponse(options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all the backup policies configured. + * + * Get a list of all the backup policies configured. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupPolicyDescriptionList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupPolicyDescriptionList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupPolicyDescriptionList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBackupPolicyList(options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getBackupPolicyList(callback: ServiceCallback): void; + getBackupPolicyList(options: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets a particular backup policy by name. + * + * Gets a particular backup policy identified by {backupPolicyName} + * + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBackupPolicyByNameWithHttpOperationResponse(backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a particular backup policy by name. + * + * Gets a particular backup policy identified by {backupPolicyName} + * + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupPolicyDescription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupPolicyDescription} [result] - The deserialized result object if an error did not occur. + * See {@link BackupPolicyDescription} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBackupPolicyByName(backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getBackupPolicyByName(backupPolicyName: string, callback: ServiceCallback): void; + getBackupPolicyByName(backupPolicyName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getAllEntitiesBackedUpByPolicyWithHttpOperationResponse(backupPolicyName: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupEntityList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupEntityList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupEntityList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getAllEntitiesBackedUpByPolicy(backupPolicyName: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getAllEntitiesBackedUpByPolicy(backupPolicyName: string, callback: ServiceCallback): void; + getAllEntitiesBackedUpByPolicy(backupPolicyName: string, options: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Updates the backup policy. + * + * Updates the backup policy identified by {backupPolicyName} + * + * + * @param {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateBackupPolicyWithHttpOperationResponse(backupPolicyDescription: models.BackupPolicyDescription, backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Updates the backup policy. + * + * Updates the backup policy identified by {backupPolicyName} + * + * + * @param {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, backupPolicyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + updateBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, backupPolicyName: string, callback: ServiceCallback): void; + updateBackupPolicy(backupPolicyDescription: models.BackupPolicyDescription, backupPolicyName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + enableApplicationBackupWithHttpOperationResponse(applicationId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + enableApplicationBackup(applicationId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + enableApplicationBackup(applicationId: string, enableBackupDescription: models.EnableBackupDescription, callback: ServiceCallback): void; + enableApplicationBackup(applicationId: string, enableBackupDescription: models.EnableBackupDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Disables periodic backup of Service Fabric application. + * + * Disables periodic backup of Service Fabric application which was previously + * enabled. + * + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + disableApplicationBackupWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Disables periodic backup of Service Fabric application. + * + * Disables periodic backup of Service Fabric application which was previously + * enabled. + * + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + disableApplicationBackup(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disableApplicationBackup(applicationId: string, callback: ServiceCallback): void; + disableApplicationBackup(applicationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getApplicationBackupConfigurationInfoWithHttpOperationResponse(applicationId: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupConfigurationInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationBackupConfigurationInfo(applicationId: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationBackupConfigurationInfo(applicationId: string, callback: ServiceCallback): void; + getApplicationBackupConfigurationInfo(applicationId: string, options: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getApplicationBackupListWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationBackupList(applicationId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationBackupList(applicationId: string, callback: ServiceCallback): void; + getApplicationBackupList(applicationId: string, options: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + suspendApplicationBackupWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + suspendApplicationBackup(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + suspendApplicationBackup(applicationId: string, callback: ServiceCallback): void; + suspendApplicationBackup(applicationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + resumeApplicationBackupWithHttpOperationResponse(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + resumeApplicationBackup(applicationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + resumeApplicationBackup(applicationId: string, callback: ServiceCallback): void; + resumeApplicationBackup(applicationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + enableServiceBackupWithHttpOperationResponse(serviceId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + enableServiceBackup(serviceId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + enableServiceBackup(serviceId: string, enableBackupDescription: models.EnableBackupDescription, callback: ServiceCallback): void; + enableServiceBackup(serviceId: string, enableBackupDescription: models.EnableBackupDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + disableServiceBackupWithHttpOperationResponse(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + disableServiceBackup(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disableServiceBackup(serviceId: string, callback: ServiceCallback): void; + disableServiceBackup(serviceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getServiceBackupConfigurationInfoWithHttpOperationResponse(serviceId: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupConfigurationInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceBackupConfigurationInfo(serviceId: string, options?: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getServiceBackupConfigurationInfo(serviceId: string, callback: ServiceCallback): void; + getServiceBackupConfigurationInfo(serviceId: string, options: { continuationToken? : string, maxResults? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getServiceBackupListWithHttpOperationResponse(serviceId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceBackupList(serviceId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getServiceBackupList(serviceId: string, callback: ServiceCallback): void; + getServiceBackupList(serviceId: string, options: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + suspendServiceBackupWithHttpOperationResponse(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + suspendServiceBackup(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + suspendServiceBackup(serviceId: string, callback: ServiceCallback): void; + suspendServiceBackup(serviceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + resumeServiceBackupWithHttpOperationResponse(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + resumeServiceBackup(serviceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + resumeServiceBackup(serviceId: string, callback: ServiceCallback): void; + resumeServiceBackup(serviceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + enablePartitionBackupWithHttpOperationResponse(partitionId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + enablePartitionBackup(partitionId: string, enableBackupDescription: models.EnableBackupDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + enablePartitionBackup(partitionId: string, enableBackupDescription: models.EnableBackupDescription, callback: ServiceCallback): void; + enablePartitionBackup(partitionId: string, enableBackupDescription: models.EnableBackupDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + disablePartitionBackupWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + disablePartitionBackup(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + disablePartitionBackup(partitionId: string, callback: ServiceCallback): void; + disablePartitionBackup(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the partition backup configuration information + * + * Gets the Service Fabric Backup configuration information for the specified + * partition. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPartitionBackupConfigurationInfoWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the partition backup configuration information + * + * Gets the Service Fabric Backup configuration information for the specified + * partition. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PartitionBackupConfigurationInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PartitionBackupConfigurationInfo} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionBackupConfigurationInfo} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionBackupConfigurationInfo(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionBackupConfigurationInfo(partitionId: string, callback: ServiceCallback): void; + getPartitionBackupConfigurationInfo(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPartitionBackupListWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionBackupList(partitionId: string, options?: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionBackupList(partitionId: string, callback: ServiceCallback): void; + getPartitionBackupList(partitionId: string, options: { timeout? : number, latest? : boolean, startDateTimeFilter? : Date, endDateTimeFilter? : Date, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + suspendPartitionBackupWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + suspendPartitionBackup(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + suspendPartitionBackup(partitionId: string, callback: ServiceCallback): void; + suspendPartitionBackup(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + resumePartitionBackupWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + resumePartitionBackup(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + resumePartitionBackup(partitionId: string, callback: ServiceCallback): void; + resumePartitionBackup(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.backupPartitionDescription] 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. + * + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + backupPartitionWithHttpOperationResponse(partitionId: string, options?: { backupPartitionDescription? : models.BackupPartitionDescription, backupTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.backupPartitionDescription] 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. + * + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + backupPartition(partitionId: string, options?: { backupPartitionDescription? : models.BackupPartitionDescription, backupTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + backupPartition(partitionId: string, callback: ServiceCallback): void; + backupPartition(partitionId: string, options: { backupPartitionDescription? : models.BackupPartitionDescription, backupTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPartitionBackupProgressWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupProgressInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupProgressInfo} [result] - The deserialized result object if an error did not occur. + * See {@link BackupProgressInfo} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionBackupProgress(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionBackupProgress(partitionId: string, callback: ServiceCallback): void; + getPartitionBackupProgress(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.restoreTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + restorePartitionWithHttpOperationResponse(partitionId: string, restorePartitionDescription: models.RestorePartitionDescription, options?: { restoreTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.restoreTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + restorePartition(partitionId: string, restorePartitionDescription: models.RestorePartitionDescription, options?: { restoreTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + restorePartition(partitionId: string, restorePartitionDescription: models.RestorePartitionDescription, callback: ServiceCallback): void; + restorePartition(partitionId: string, restorePartitionDescription: models.RestorePartitionDescription, options: { restoreTimeout? : number, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPartitionRestoreProgressWithHttpOperationResponse(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RestoreProgressInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RestoreProgressInfo} [result] - The deserialized result object if an error did not occur. + * See {@link RestoreProgressInfo} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionRestoreProgress(partitionId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionRestoreProgress(partitionId: string, callback: ServiceCallback): void; + getPartitionRestoreProgress(partitionId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. + * + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. + * + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. + * + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. + * + * @param {object} getBackupByStorageQueryDescription.storage 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. + * + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator + * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. + * + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBackupsFromBackupLocationWithHttpOperationResponse(getBackupByStorageQueryDescription: models.GetBackupByStorageQueryDescription, options?: { timeout? : number, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. + * + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. + * + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. + * + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. + * + * @param {object} getBackupByStorageQueryDescription.storage 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. + * + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator + * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. + * + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedBackupInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedBackupInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBackupsFromBackupLocation(getBackupByStorageQueryDescription: models.GetBackupByStorageQueryDescription, options?: { timeout? : number, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getBackupsFromBackupLocation(getBackupByStorageQueryDescription: models.GetBackupByStorageQueryDescription, callback: ServiceCallback): void; + getBackupsFromBackupLocation(getBackupByStorageQueryDescription: models.GetBackupByStorageQueryDescription, options: { timeout? : number, continuationToken? : string, maxResults? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Creates a Service Fabric name. + * + * Creates the specified Service Fabric name. + * + * @param {object} nameDescription Describes the Service Fabric name to be + * created. + * + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createNameWithHttpOperationResponse(nameDescription: models.NameDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates a Service Fabric name. + * + * Creates the specified Service Fabric name. + * + * @param {object} nameDescription Describes the Service Fabric name to be + * created. + * + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createName(nameDescription: models.NameDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + createName(nameDescription: models.NameDescription, callback: ServiceCallback): void; + createName(nameDescription: models.NameDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Returns whether the Service Fabric name exists. + * + * Returns whether the specified Service Fabric name exists. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getNameExistsInfoWithHttpOperationResponse(nameId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Returns whether the Service Fabric name exists. + * + * Returns whether the specified Service Fabric name exists. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getNameExistsInfo(nameId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getNameExistsInfo(nameId: string, callback: ServiceCallback): void; + getNameExistsInfo(nameId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteNameWithHttpOperationResponse(nameId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteName(nameId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteName(nameId: string, callback: ServiceCallback): void; + deleteName(nameId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getSubNameInfoListWithHttpOperationResponse(nameId: string, options?: { recursive? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedSubNameInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedSubNameInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSubNameInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getSubNameInfoList(nameId: string, options?: { recursive? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getSubNameInfoList(nameId: string, callback: ServiceCallback): void; + getSubNameInfoList(nameId: string, options: { recursive? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets information on all Service Fabric properties under a given + * name. + * + * A Service Fabric name can have one or more named properties that stores + * custom information. This operation gets the information about these + * properties in a paged list. The information include name, value and metadata + * about each of the properties. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.includeValues] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPropertyInfoListWithHttpOperationResponse(nameId: string, options?: { includeValues? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets information on all Service Fabric properties under a given + * name. + * + * A Service Fabric name can have one or more named properties that stores + * custom information. This operation gets the information about these + * properties in a paged list. The information include name, value and metadata + * about each of the properties. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.includeValues] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PagedPropertyInfoList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PagedPropertyInfoList} [result] - The deserialized result object if an error did not occur. + * See {@link PagedPropertyInfoList} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPropertyInfoList(nameId: string, options?: { includeValues? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPropertyInfoList(nameId: string, callback: ServiceCallback): void; + getPropertyInfoList(nameId: string, options: { includeValues? : boolean, continuationToken? : string, timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Creates or updates a Service Fabric property. + * + * Creates or updates the specified Service Fabric property under a given name. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type id. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + putPropertyWithHttpOperationResponse(nameId: string, propertyDescription: models.PropertyDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Creates or updates a Service Fabric property. + * + * Creates or updates the specified Service Fabric property under a given name. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type id. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + putProperty(nameId: string, propertyDescription: models.PropertyDescription, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + putProperty(nameId: string, propertyDescription: models.PropertyDescription, callback: ServiceCallback): void; + putProperty(nameId: string, propertyDescription: models.PropertyDescription, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPropertyInfoWithHttpOperationResponse(nameId: string, propertyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PropertyInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PropertyInfo} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyInfo} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPropertyInfo(nameId: string, propertyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getPropertyInfo(nameId: string, propertyName: string, callback: ServiceCallback): void; + getPropertyInfo(nameId: string, propertyName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deletePropertyWithHttpOperationResponse(nameId: string, propertyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteProperty(nameId: string, propertyName: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + deleteProperty(nameId: string, propertyName: string, callback: ServiceCallback): void; + deleteProperty(nameId: string, propertyName: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Submits a property batch. + * + * Submits a batch of property operations. Either all or none of the operations + * will be committed. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. + * + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + submitPropertyBatchWithHttpOperationResponse(nameId: string, propertyBatchDescriptionList: models.PropertyBatchDescriptionList, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Submits a property batch. + * + * Submits a batch of property operations. Either all or none of the operations + * will be committed. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. + * + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PropertyBatchInfo} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PropertyBatchInfo} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyBatchInfo} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + submitPropertyBatch(nameId: string, propertyBatchDescriptionList: models.PropertyBatchDescriptionList, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + submitPropertyBatch(nameId: string, propertyBatchDescriptionList: models.PropertyBatchDescriptionList, callback: ServiceCallback): void; + submitPropertyBatch(nameId: string, propertyBatchDescriptionList: models.PropertyBatchDescriptionList, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all Cluster-related events. + * + * The response is list of ClusterEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getClusterEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all Cluster-related events. + * + * The response is list of ClusterEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getClusterEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getClusterEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all Containers-related events. + * + * The response is list of ContainerInstanceEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getContainersEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all Containers-related events. + * + * The response is list of ContainerInstanceEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getContainersEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getContainersEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getContainersEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets a Node-related events. + * + * The response is list of NodeEvent objects. + * + * @param {string} nodeName The name of the node. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getNodeEventListWithHttpOperationResponse(nodeName: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a Node-related events. + * + * The response is list of NodeEvent objects. + * + * @param {string} nodeName The name of the node. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Array} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeEventList(nodeName: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getNodeEventList(nodeName: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getNodeEventList(nodeName: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets all Nodes-related Events. + * + * The response is list of NodeEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * 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. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * Call the GetDataLossProgress API with the same OperationId to return - * information on the operation started with this API. + * @returns {Promise} A promise is returned * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @reject {Error|ServiceError} - The error object. + */ + getNodesEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets all Nodes-related Events. * - * @param {uuid} partitionId The identity of the partition. + * The response is list of NodeEvent objects. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - PartialDataLoss - PartialDataLoss option will cause a quorum of replicas - * to go down, triggering an OnDataLoss event in the system for the given - * partition. - * - FullDataLoss - FullDataLoss option will drop all the replicas which means - * that all the data will be lost. - * . Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17694,7 +25423,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17702,81 +25431,109 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, callback: ServiceCallback): void; - startDataLoss(serviceId: string, partitionId: string, operationId: string, dataLossMode: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getNodesEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getNodesEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getNodesEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary 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. + * @summary Gets an Application-related events. * + * The response is list of ApplicationEvent objects. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getDataLossProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getApplicationEventListWithHttpOperationResponse(applicationId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the progress of a partition data loss operation started using - * the StartDataLoss API. + * @summary Gets an Application-related events. * - * Gets the progress of a data loss operation started with StartDataLoss, using - * the OperationId. + * The response is list of ApplicationEvent objects. * - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17788,7 +25545,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {PartitionDataLossProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17796,119 +25553,91 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PartitionDataLossProgress} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionDataLossProgress} for more - * information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getDataLossProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getDataLossProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; - getDataLossProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getApplicationEventList(applicationId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationEventList(applicationId: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getApplicationEventList(applicationId: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Induces quorum loss for a given stateful service partition. - * - * Induces quorum loss for a given stateful service partition. This API is - * useful for a temporary quorum loss situation on your service. + * @summary Gets all Applications-related events. * - * Call the GetQuorumLossProgress API with the same OperationId to return - * information on the operation started with this API. + * The response is list of ApplicationEvent objects. * - * 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 {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} [options] Optional Parameters. * - * @param {uuid} partitionId The identity of the partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - QuorumReplicas - Partial Quorum loss mode : Minimum number of replicas for - * a partition will be down that will cause a quorum loss. - * - AllReplicas- Full Quorum loss mode : All replicas for a partition will be - * down that will cause a quorum loss. - * . Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startQuorumLossWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getApplicationsEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Induces quorum loss for a given stateful service partition. + * @summary Gets all Applications-related events. * - * 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. + * The response is list of ApplicationEvent objects. * - * 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 {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} [options] Optional Parameters. * - * @param {uuid} partitionId The identity of the partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - QuorumReplicas - Partial Quorum loss mode : Minimum number of replicas for - * a partition will be down that will cause a quorum loss. - * - AllReplicas- Full Quorum loss mode : All replicas for a partition will be - * down that will cause a quorum loss. - * . Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17920,7 +25649,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17928,81 +25657,109 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, callback: ServiceCallback): void; - startQuorumLoss(serviceId: string, partitionId: string, operationId: string, quorumLossMode: string, quorumLossDuration: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getApplicationsEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getApplicationsEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getApplicationsEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary 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. + * @summary Gets a Service-related events. * + * The response is list of ServiceEvent objects. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getQuorumLossProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getServiceEventListWithHttpOperationResponse(serviceId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary 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. + * @summary Gets a Service-related events. * + * The response is list of ServiceEvent objects. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18014,7 +25771,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {PartitionQuorumLossProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18022,109 +25779,91 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PartitionQuorumLossProgress} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionQuorumLossProgress} for more - * information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; - getQuorumLossProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getServiceEventList(serviceId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getServiceEventList(serviceId: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getServiceEventList(serviceId: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. + * @summary Gets all Services-related events. * - * This API is useful for testing failover. + * The response is list of ServiceEvent objects. * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} restartPartitionMode - Invalid - Reserved. Do not pass into - * API. - * - AllReplicasOrInstances - All replicas or instances in the partition are - * restarted at once. - * - OnlyActiveSecondaries - Only the secondary replicas are restarted. - * . Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startPartitionRestartWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getServicesEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. + * @summary Gets all Services-related events. * - * This API is useful for testing failover. + * The response is list of ServiceEvent objects. * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} restartPartitionMode - Invalid - Reserved. Do not pass into - * API. - * - AllReplicasOrInstances - All replicas or instances in the partition are - * restarted at once. - * - OnlyActiveSecondaries - Only the secondary replicas are restarted. - * . Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18136,7 +25875,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18144,81 +25883,95 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, callback: ServiceCallback): void; - startPartitionRestart(serviceId: string, partitionId: string, operationId: string, restartPartitionMode: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getServicesEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getServicesEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getServicesEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. - * + * @summary Gets a Partition-related events. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * The response is list of PartitionEvent objects. * * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getPartitionRestartProgressWithHttpOperationResponse(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. - * + getPartitionEventListWithHttpOperationResponse(partitionId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets a Partition-related events. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * The response is list of PartitionEvent objects. * * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18230,7 +25983,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {PartitionRestartProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18238,109 +25991,91 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PartitionRestartProgress} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionRestartProgress} for more - * information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, callback: ServiceCallback): void; - getPartitionRestartProgress(serviceId: string, partitionId: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getPartitionEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getPartitionEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Starts or stops a cluster node. + * @summary Gets all Partitions-related events. * - * 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. + * The response is list of PartitionEvent objects. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} nodeName The name of the node. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {object} [options] Optional Parameters. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. - * - Invalid - Reserved. Do not pass into API. - * - Start - Transition a stopped node to up. - * - Stop - Transition an up node to stopped. - * . Possible values include: 'Invalid', 'Start', 'Stop' + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {number} stopDurationInSeconds 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. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startNodeTransitionWithHttpOperationResponse(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getPartitionsEventListWithHttpOperationResponse(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Starts or stops a cluster node. + * @summary Gets all Partitions-related events. * - * 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. + * The response is list of PartitionEvent objects. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} nodeName The name of the node. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {object} [options] Optional Parameters. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. - * - Invalid - Reserved. Do not pass into API. - * - Start - Transition a stopped node to up. - * - Stop - Transition an up node to stopped. - * . Possible values include: 'Invalid', 'Start', 'Stop' + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {number} stopDurationInSeconds 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. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18352,7 +26087,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18360,67 +26095,99 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, callback: ServiceCallback): void; - startNodeTransition(nodeName: string, operationId: string, nodeTransitionType: string, nodeInstanceId: string, stopDurationInSeconds: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getPartitionsEventList(startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionsEventList(startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getPartitionsEventList(startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Gets a Partition Replica-related events. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {string} nodeName The name of the node. + * @param {string} replicaId The identifier of the replica. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getNodeTransitionProgressWithHttpOperationResponse(nodeName: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getPartitionReplicaEventListWithHttpOperationResponse(partitionId: string, replicaId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Gets a Partition Replica-related events. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {string} nodeName The name of the node. + * @param {string} replicaId The identifier of the replica. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18432,7 +26199,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {NodeTransitionProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18440,51 +26207,50 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NodeTransitionProgress} [result] - The deserialized result object if an error did not occur. - * See {@link NodeTransitionProgress} for more - * information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getNodeTransitionProgress(nodeName: string, operationId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getNodeTransitionProgress(nodeName: string, operationId: string, callback: ServiceCallback): void; - getNodeTransitionProgress(nodeName: string, operationId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getPartitionReplicaEventList(partitionId: string, replicaId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionReplicaEventList(partitionId: string, replicaId: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getPartitionReplicaEventList(partitionId: string, replicaId: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. + * @summary Gets all Replicas-related events for a Partition. * - * Gets the a list of user-induced fault operations filtered by provided input. - * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {number} stateFilter 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 + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18495,40 +26261,41 @@ declare class ServiceFabricClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getFaultOperationListWithHttpOperationResponse(typeFilter: number, stateFilter: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getPartitionReplicasEventListWithHttpOperationResponse(partitionId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. - * - * Gets the a list of user-induced fault operations filtered by provided input. + * @summary Gets all Replicas-related events for a Partition. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {number} stateFilter 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 + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18554,111 +26321,49 @@ declare class ServiceFabricClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getFaultOperationList(typeFilter: number, stateFilter: number, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getFaultOperationList(typeFilter: number, stateFilter: number, callback: ServiceCallback): void; - getFaultOperationList(typeFilter: number, stateFilter: number, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getPartitionReplicasEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, options?: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }): Promise; + getPartitionReplicasEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, callback: ServiceCallback): void; + getPartitionReplicasEventList(partitionId: string, startTimeUtc: string, endTimeUtc: string, options: { timeout? : number, eventsTypesFilter? : string, excludeAnalysisEvents? : boolean, skipCorrelationLookup? : boolean, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Cancels a user-induced fault operation. - * - * The following is a list of APIs that start fault operations that may be - * cancelled using CancelOperation - - * - StartDataLoss - * - StartQuorumLoss - * - StartPartitionRestart - * - StartNodeTransition - * - * 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/is be - * 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. - * + * @summary Gets all correlated events for a given event. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * The response is list of FabricEvents. * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - cancelOperationWithHttpOperationResponse(operationId: string, force: boolean, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getCorrelatedEventListWithHttpOperationResponse(eventInstanceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Cancels a user-induced fault operation. - * - * The following is a list of APIs that start fault operations that may be - * cancelled using CancelOperation - - * - StartDataLoss - * - StartQuorumLoss - * - StartPartitionRestart - * - StartNodeTransition - * - * 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/is be - * 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. + * @summary Gets all correlated events for a given event. * + * The response is list of FabricEvents. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API - * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18670,7 +26375,7 @@ declare class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18678,15 +26383,15 @@ declare class ServiceFabricClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - cancelOperation(operationId: string, force: boolean, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - cancelOperation(operationId: string, force: boolean, callback: ServiceCallback): void; - cancelOperation(operationId: string, force: boolean, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getCorrelatedEventList(eventInstanceId: string, options?: { timeout? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getCorrelatedEventList(eventInstanceId: string, callback: ServiceCallback): void; + getCorrelatedEventList(eventInstanceId: string, options: { timeout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } -export = ServiceFabricClient; +export { ServiceFabricClient, models as ServiceFabricModels }; diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.js b/lib/services/serviceFabric/lib/serviceFabricClient.js index 3b466440f2..2408da7ee9 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.js +++ b/lib/services/serviceFabric/lib/serviceFabricClient.js @@ -26,13 +26,13 @@ const models = require('./models'); * * Get the Service Fabric cluster manifest. The cluster manifest contains * properties of the cluster that include different node types on the cluster, - * security configurations, fault and upgrade domain topologies etc. + * security configurations, fault and upgrade domain topologies, etc. * * These properties are specified as part of the ClusterConfig.JSON file while * deploying a stand alone cluster. However, most of the information in the * cluster manifest * is generated internally by service fabric during cluster deployment in other - * deployment scenarios (for e.g when using azuer portal). + * 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 @@ -42,9 +42,9 @@ const models = require('./models'); * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -285,9 +285,9 @@ function _getClusterManifest(options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -578,8 +578,21 @@ function _getClusterHealth(options, callback) { * * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] @@ -623,11 +636,34 @@ function _getClusterHealth(options, callback) { * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -824,9 +860,9 @@ function _getClusterHealthUsingPolicy(options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1028,7 +1064,10 @@ function _getClusterHealthChunk(options, callback) { * * * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. + * * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] @@ -1072,17 +1111,45 @@ function _getClusterHealthChunk(options, callback) { * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1271,11 +1338,13 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -1310,7 +1379,7 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -1327,15 +1396,15 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * 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 + * 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. + * 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 + * 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 + * 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 @@ -1344,9 +1413,9 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1498,9 +1567,9 @@ function _reportClusterHealth(healthInformation, options, callback) { * @param {string} [options.codeVersion] The product version of Service Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1667,9 +1736,9 @@ function _getProvisionedFabricCodeVersionInfoList(options, callback) { * Fabric. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1831,9 +1900,9 @@ function _getProvisionedFabricConfigVersionInfoList(options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1973,7 +2042,7 @@ function _getClusterUpgradeProgress(options, callback) { * 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. + * security configurations, fault and upgrade domain topologies, etc. * * * @param {string} configurationApiVersion The API version of the Standalone @@ -1982,9 +2051,9 @@ function _getClusterUpgradeProgress(options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2125,16 +2194,16 @@ function _getClusterConfiguration(configurationApiVersion, options, callback) { * @summary Get the cluster configuration upgrade status of a Service Fabric * standalone cluster. * - * 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2269,27 +2338,170 @@ function _getClusterConfigurationUpgradeStatus(options, callback) { } /** - * @summary Provision the code or configuration packages of a Service Fabric - * cluster. + * @summary Get the service state of Service Fabric Upgrade Orchestration + * Service. * - * Validate and provision the code or configuration packages of a Service - * Fabric cluster. + * Get the service state of Service Fabric Upgrade Orchestration Service. This + * API is internally used for support purposes. * - * @param {object} provisionFabricDescription Describes the parameters for - * provisioning a cluster. + * @param {object} [options] Optional Parameters. * - * @param {string} [provisionFabricDescription.codeFilePath] The cluster code - * package file path. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} [provisionFabricDescription.clusterManifestFilePath] The - * cluster manifest file path. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceState} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getUpgradeOrchestrationServiceState(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/GetUpgradeOrchestrationServiceState'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['UpgradeOrchestrationServiceState']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. + * + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2300,13 +2512,15 @@ function _getClusterConfigurationUpgradeStatus(options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceStateSummary} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _provisionCluster(provisionFabricDescription, options, callback) { +function _setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2320,8 +2534,8 @@ function _provisionCluster(provisionFabricDescription, options, callback) { let apiVersion = '6.0'; // Validate try { - if (provisionFabricDescription === null || provisionFabricDescription === undefined) { - throw new Error('provisionFabricDescription cannot be null or undefined.'); + if (upgradeOrchestrationServiceState === null || upgradeOrchestrationServiceState === undefined) { + throw new Error('upgradeOrchestrationServiceState cannot be null or undefined.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -2342,7 +2556,7 @@ function _provisionCluster(provisionFabricDescription, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/Provision'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/SetUpgradeOrchestrationServiceState'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -2370,14 +2584,14 @@ function _provisionCluster(provisionFabricDescription, options, callback) { let requestContent = null; let requestModel = null; try { - if (provisionFabricDescription !== null && provisionFabricDescription !== undefined) { - let requestModelMapper = new client.models['ProvisionFabricDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, provisionFabricDescription, 'provisionFabricDescription'); + if (upgradeOrchestrationServiceState !== null && upgradeOrchestrationServiceState !== undefined) { + let requestModelMapper = new client.models['UpgradeOrchestrationServiceState']().mapper(); + requestModel = client.serialize(requestModelMapper, upgradeOrchestrationServiceState, 'upgradeOrchestrationServiceState'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(provisionFabricDescription, null, 2)}.`); + `payload - ${JSON.stringify(upgradeOrchestrationServiceState, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2416,32 +2630,50 @@ function _provisionCluster(provisionFabricDescription, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['UpgradeOrchestrationServiceStateSummary']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Unprovision the code or configuration packages of a Service Fabric + * @summary Provision the code or configuration packages of a Service Fabric * cluster. * - * Unprovision the code or configuration packages of a Service Fabric cluster. + * Validate and provision the code or configuration packages of a Service + * Fabric cluster. * - * @param {object} unprovisionFabricDescription Describes the parameters for - * unprovisioning a cluster. + * @param {object} provisionFabricDescription Describes the parameters for + * provisioning a cluster. * - * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code - * package version. + * @param {string} [provisionFabricDescription.codeFilePath] The cluster code + * package file path. * - * @param {string} [unprovisionFabricDescription.configVersion] The cluster - * manifest version. + * @param {string} [provisionFabricDescription.clusterManifestFilePath] The + * cluster manifest file path. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2458,7 +2690,7 @@ function _provisionCluster(provisionFabricDescription, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _unprovisionCluster(unprovisionFabricDescription, options, callback) { +function _provisionCluster(provisionFabricDescription, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2472,8 +2704,8 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { let apiVersion = '6.0'; // Validate try { - if (unprovisionFabricDescription === null || unprovisionFabricDescription === undefined) { - throw new Error('unprovisionFabricDescription cannot be null or undefined.'); + if (provisionFabricDescription === null || provisionFabricDescription === undefined) { + throw new Error('provisionFabricDescription cannot be null or undefined.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -2494,7 +2726,7 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/Unprovision'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/Provision'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -2522,14 +2754,14 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { let requestContent = null; let requestModel = null; try { - if (unprovisionFabricDescription !== null && unprovisionFabricDescription !== undefined) { - let requestModelMapper = new client.models['UnprovisionFabricDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, unprovisionFabricDescription, 'unprovisionFabricDescription'); + if (provisionFabricDescription !== null && provisionFabricDescription !== undefined) { + let requestModelMapper = new client.models['ProvisionFabricDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, provisionFabricDescription, 'provisionFabricDescription'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(unprovisionFabricDescription, null, 2)}.`); + `payload - ${JSON.stringify(provisionFabricDescription, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2574,16 +2806,27 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { } /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Unprovision the code or configuration packages of a Service Fabric + * cluster. + * + * Unprovision the code or configuration packages of a Service Fabric cluster. + * It is supported to unprovision code and configuration separately. + * + * @param {object} unprovisionFabricDescription Describes the parameters for + * unprovisioning a cluster. + * + * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code + * package version. * - * Rollback the upgrade of a Service Fabric cluster. + * @param {string} [unprovisionFabricDescription.configVersion] The cluster + * manifest version. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2600,7 +2843,7 @@ function _unprovisionCluster(unprovisionFabricDescription, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _rollbackClusterUpgrade(options, callback) { +function _unprovisionCluster(unprovisionFabricDescription, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2614,6 +2857,9 @@ function _rollbackClusterUpgrade(options, callback) { let apiVersion = '6.0'; // Validate try { + if (unprovisionFabricDescription === null || unprovisionFabricDescription === undefined) { + throw new Error('unprovisionFabricDescription cannot be null or undefined.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -2633,7 +2879,7 @@ function _rollbackClusterUpgrade(options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/RollbackUpgrade'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/Unprovision'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -2657,14 +2903,28 @@ function _rollbackClusterUpgrade(options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (unprovisionFabricDescription !== null && unprovisionFabricDescription !== undefined) { + let requestModelMapper = new client.models['UnprovisionFabricDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, unprovisionFabricDescription, 'unprovisionFabricDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(unprovisionFabricDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2699,22 +2959,148 @@ function _rollbackClusterUpgrade(options, callback) { } /** - * @summary Make the cluster upgrade move on to the next upgrade domain. - * - * Make the cluster upgrade move on to the next upgrade domain. - * - * @param {object} resumeClusterUpgradeDescription Describes the parameters for - * resuming a cluster upgrade. + * @summary Rollback the upgrade of a Service Fabric cluster. * - * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next - * upgrade domain for this cluster upgrade. + * Rollback the code or configuration upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _rollbackClusterUpgrade(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/RollbackUpgrade'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {object} resumeClusterUpgradeDescription Describes the parameters for + * resuming a cluster upgrade. + * + * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next + * upgrade domain for this cluster upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2863,40 +3249,82 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * @param {string} [startClusterUpgradeDescription.configVersion] The cluster * configuration version. * - * @param {string} [startClusterUpgradeDescription.upgradeKind] Possible values - * include: 'Invalid', 'Rolling' + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -2940,6 +3368,29 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, @@ -2947,6 +3398,8 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * completion of each upgrade domain. * * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -2968,16 +3421,21 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * tolerated limits. The default value is 15%. * * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3167,9 +3625,9 @@ function _startClusterUpgrade(startClusterUpgradeDescription, options, callback) * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3304,47 +3762,90 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio /** * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. * - * Update the upgrade parameters of a Service Fabric cluster upgrade. + * Update the upgrade parameters used during a Service Fabric cluster upgrade. * * @param {object} updateClusterUpgradeDescription Parameters for updating a * cluster upgrade. * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] Possible - * values include: 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' * * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {number} * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [updateClusterUpgradeDescription.updateDescription.failureAction] 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' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] @@ -3388,11 +3889,38 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. * * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. * * @param {number} * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] @@ -3414,16 +3942,21 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * tolerated limits. The default value is 15%. * * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3569,9 +4102,9 @@ function _updateClusterUpgrade(updateClusterUpgradeDescription, options, callbac * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3707,9 +4240,8 @@ function _getAadMetadata(options, callback) { /** * @summary Gets the list of nodes in the Service Fabric cluster. * - * The Nodes endpoint returns information about the nodes in the Service Fabric - * Cluster. The respons include the name, status, id, health, uptime and other - * details about the node. + * Gets the list of nodes in the Service Fabric cluster. The response includes + * the name, status, id, health, uptime, and other details about the node. * * @param {object} [options] Optional Parameters. * @@ -3724,31 +4256,13 @@ function _getAadMetadata(options, callback) { * @param {string} [options.nodeStatusFilter] 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 - This filter value will match all of the nodes excepts the ones - * with with status as Unknown or Removed. - * - all - This filter value will match all of the nodes. - * - up - This filter value will match nodes that are Up. - * - down - This filter value will match nodes that are Down. - * - enabling - This filter value will match nodes that are in the process of - * being enabled with status as Enabling. - * - disabling - This filter value will match nodes that are in the process of - * being disabled with status as Disabling. - * - disabled - This filter value will match nodes that are Disabled. - * - 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 - This filter value will match nodes whose status is Removed. - * These are the nodes that are removed from the cluster using the - * RemoveNodeState API. - * . Possible values include: 'default', 'all', 'up', 'down', 'enabling', + * Possible values include: 'default', 'all', 'up', 'down', 'enabling', * 'disabling', 'disabled', 'unknown', 'removed' * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3896,20 +4410,21 @@ function _getNodeInfoList(options, callback) { } /** - * @summary Gets the list of nodes in the Service Fabric cluster. + * @summary Gets the information about a specific node in the Service Fabric + * cluster. * - * Gets the information about a specific node in the Service Fabric Cluster.The - * respons include the name, status, id, health, uptime and other details about - * the node. + * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4083,9 +4598,9 @@ function _getNodeInfo(nodeName, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4311,11 +4826,34 @@ function _getNodeHealth(nodeName, options, callback) { * * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4516,11 +5054,13 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -4555,7 +5095,7 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -4572,15 +5112,15 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * 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 + * 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. + * 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 + * 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 + * 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 @@ -4589,9 +5129,9 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4737,16 +5277,17 @@ function _reportNodeHealth(nodeName, healthInformation, options, callback) { /** * @summary Gets the load information of a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4905,19 +5446,14 @@ function _getNodeLoadInfo(nodeName, options, callback) { * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are * following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. * . Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5067,9 +5603,9 @@ function _disableNode(nodeName, deactivationIntentDescription, options, callback * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5207,9 +5743,9 @@ function _enableNode(nodeName, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5338,10 +5874,10 @@ function _removeNodeState(nodeName, options, callback) { * @param {object} restartNodeDescription The instance of the node to be * restarted and a flag indicating the need to take dump of the fabric process. * - * @param {string} restartNodeDescription.nodeInstanceId The instance id of the - * target node. If instance id is specified the node is restarted only if it + * @param {string} restartNodeDescription.nodeInstanceId 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. + * match any instance ID. The instance ID can be obtained using get node query. * * @param {string} [restartNodeDescription.createFabricDump] Specify True to * create a dump of the fabric node process. This is case sensitive. Possible @@ -5350,9 +5886,9 @@ function _removeNodeState(nodeName, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5507,9 +6043,10 @@ function _restartNode(nodeName, restartNodeDescription, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind for application type query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationTypeDefinitionKind value. The value is 0. + * 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 @@ -5535,13 +6072,13 @@ function _restartNode(nodeName, restartNodeDescription, options, callback) { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5570,7 +6107,7 @@ function _getApplicationTypeInfoList(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let applicationTypeDefinitionKindFilter = (options && options.applicationTypeDefinitionKindFilter !== undefined) ? options.applicationTypeDefinitionKindFilter : 65535; + let applicationTypeDefinitionKindFilter = (options && options.applicationTypeDefinitionKindFilter !== undefined) ? options.applicationTypeDefinitionKindFilter : 0; let excludeApplicationParameters = (options && options.excludeApplicationParameters !== undefined) ? options.excludeApplicationParameters : false; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; @@ -5733,6 +6270,9 @@ function _getApplicationTypeInfoList(options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.applicationTypeVersion] The version of the + * application type. + * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -5749,13 +6289,13 @@ function _getApplicationTypeInfoList(options, callback) { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5784,6 +6324,7 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } + let applicationTypeVersion = (options && options.applicationTypeVersion !== undefined) ? options.applicationTypeVersion : undefined; let excludeApplicationParameters = (options && options.excludeApplicationParameters !== undefined) ? options.excludeApplicationParameters : false; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; @@ -5794,6 +6335,9 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac if (applicationTypeName === null || applicationTypeName === undefined || typeof applicationTypeName.valueOf() !== 'string') { throw new Error('applicationTypeName cannot be null or undefined and it must be of type string.'); } + if (applicationTypeVersion !== null && applicationTypeVersion !== undefined && typeof applicationTypeVersion.valueOf() !== 'string') { + throw new Error('applicationTypeVersion must be of type string.'); + } if (excludeApplicationParameters !== null && excludeApplicationParameters !== undefined && typeof excludeApplicationParameters !== 'boolean') { throw new Error('excludeApplicationParameters must be of type boolean.'); } @@ -5832,6 +6376,9 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac requestUrl = requestUrl.replace('{applicationTypeName}', encodeURIComponent(applicationTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (applicationTypeVersion !== null && applicationTypeVersion !== undefined) { + queryParameters.push('ApplicationTypeVersion=' + encodeURIComponent(applicationTypeVersion)); + } if (excludeApplicationParameters !== null && excludeApplicationParameters !== undefined) { queryParameters.push('ExcludeApplicationParameters=' + encodeURIComponent(excludeApplicationParameters.toString())); } @@ -5922,24 +6469,38 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac /** * @summary Provisions or registers a Service Fabric application type with the - * cluster. + * cluster using the '.sfpkg' package in the external store or using the + * application package in the image store. * - * Provisions or registers a Service Fabric application type with the cluster. - * This is required before any new applications can be instantiated. + * 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 {object} applicationTypeImageStorePath The relative path for the - * application package in the image store specified during the prior copy - * operation. * - * @param {string} applicationTypeImageStorePath.applicationTypeBuildPath The - * relative image store path to the application package. + * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. + * + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async 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. + * + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5956,7 +6517,7 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _provisionApplicationType(applicationTypeImageStorePath, options, callback) { +function _provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -5967,11 +6528,11 @@ function _provisionApplicationType(applicationTypeImageStorePath, options, callb throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.2'; // Validate try { - if (applicationTypeImageStorePath === null || applicationTypeImageStorePath === undefined) { - throw new Error('applicationTypeImageStorePath cannot be null or undefined.'); + if (provisionApplicationTypeDescriptionBaseRequiredBodyParam === null || provisionApplicationTypeDescriptionBaseRequiredBodyParam === undefined) { + throw new Error('provisionApplicationTypeDescriptionBaseRequiredBodyParam cannot be null or undefined.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -6020,14 +6581,14 @@ function _provisionApplicationType(applicationTypeImageStorePath, options, callb let requestContent = null; let requestModel = null; try { - if (applicationTypeImageStorePath !== null && applicationTypeImageStorePath !== undefined) { - let requestModelMapper = new client.models['ApplicationTypeImageStorePath']().mapper(); - requestModel = client.serialize(requestModelMapper, applicationTypeImageStorePath, 'applicationTypeImageStorePath'); + if (provisionApplicationTypeDescriptionBaseRequiredBodyParam !== null && provisionApplicationTypeDescriptionBaseRequiredBodyParam !== undefined) { + let requestModelMapper = new client.models['ProvisionApplicationTypeDescriptionBase']().mapper(); + requestModel = client.serialize(requestModelMapper, provisionApplicationTypeDescriptionBaseRequiredBodyParam, 'provisionApplicationTypeDescriptionBaseRequiredBodyParam'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(applicationTypeImageStorePath, null, 2)}.`); + `payload - ${JSON.stringify(provisionApplicationTypeDescriptionBaseRequiredBodyParam, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -6037,7 +6598,7 @@ function _provisionApplicationType(applicationTypeImageStorePath, options, callb return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -6076,24 +6637,34 @@ function _provisionApplicationType(applicationTypeImageStorePath, options, callb * cluster. * * Removes or unregisters a Service Fabric application type from the cluster. - * This operation can only be performed if all application instance of the + * This operation can only be performed if all application instances of the * application type has been deleted. Once the application type is - * unregistered, no new application instance can be created for this particular - * application type. + * unregistered, no new application instances can be created for this + * particular application type. * * @param {string} applicationTypeName The name of the application type. * - * @param {object} applicationTypeImageStoreVersion The version of the - * application type in the image store. + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. * - * @param {string} applicationTypeImageStoreVersion.applicationTypeVersion + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. + * + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] 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 to set it to true + * for large application packages that were provisioned. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6110,7 +6681,7 @@ function _provisionApplicationType(applicationTypeImageStorePath, options, callb * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _unprovisionApplicationType(applicationTypeName, applicationTypeImageStoreVersion, options, callback) { +function _unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -6127,8 +6698,8 @@ function _unprovisionApplicationType(applicationTypeName, applicationTypeImageSt if (applicationTypeName === null || applicationTypeName === undefined || typeof applicationTypeName.valueOf() !== 'string') { throw new Error('applicationTypeName cannot be null or undefined and it must be of type string.'); } - if (applicationTypeImageStoreVersion === null || applicationTypeImageStoreVersion === undefined) { - throw new Error('applicationTypeImageStoreVersion cannot be null or undefined.'); + if (unprovisionApplicationTypeDescriptionInfo === null || unprovisionApplicationTypeDescriptionInfo === undefined) { + throw new Error('unprovisionApplicationTypeDescriptionInfo cannot be null or undefined.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -6178,14 +6749,14 @@ function _unprovisionApplicationType(applicationTypeName, applicationTypeImageSt let requestContent = null; let requestModel = null; try { - if (applicationTypeImageStoreVersion !== null && applicationTypeImageStoreVersion !== undefined) { - let requestModelMapper = new client.models['ApplicationTypeImageStoreVersion']().mapper(); - requestModel = client.serialize(requestModelMapper, applicationTypeImageStoreVersion, 'applicationTypeImageStoreVersion'); + if (unprovisionApplicationTypeDescriptionInfo !== null && unprovisionApplicationTypeDescriptionInfo !== undefined) { + let requestModelMapper = new client.models['UnprovisionApplicationTypeDescriptionInfo']().mapper(); + requestModel = client.serialize(requestModelMapper, unprovisionApplicationTypeDescriptionInfo, 'unprovisionApplicationTypeDescriptionInfo'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(applicationTypeImageStoreVersion, null, 2)}.`); + `payload - ${JSON.stringify(unprovisionApplicationTypeDescriptionInfo, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -6195,7 +6766,7 @@ function _unprovisionApplicationType(applicationTypeName, applicationTypeImageSt return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -6235,9 +6806,7 @@ function _unprovisionApplicationType(applicationTypeName, applicationTypeImageSt * * Gets the list containing the information about service types that are * supported by a provisioned application type in a Service Fabric cluster. The - * response includes the name of the service type, the name and version of the - * service manifest the type is defined in, kind (stateless or stateless) of - * the service type and other information about it. + * provided application type must exist. Otherwise, a 404 status is returned. * * @param {string} applicationTypeName The name of the application type. * @@ -6246,9 +6815,9 @@ function _unprovisionApplicationType(applicationTypeName, applicationTypeImageSt * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6337,7 +6906,7 @@ function _getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -6403,24 +6972,28 @@ function _getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, op } /** - * @summary Gets the manifest describing a service type. + * @summary Gets the information about a specific service type that is + * supported by a provisioned application type in a Service Fabric cluster. * - * Gets the manifest describing a service type. The response contains the - * service manifest XML as a string. + * 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 specificed service type is not found in the + * cluster. * * @param {string} applicationTypeName The name of the application type. * * @param {string} applicationTypeVersion The version of the application type. * - * @param {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6432,13 +7005,13 @@ function _getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, op * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceTypeManifest} for more information. + * See {@link ServiceTypeInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, callback) { +function _getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -6458,8 +7031,8 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic if (applicationTypeVersion === null || applicationTypeVersion === undefined || typeof applicationTypeVersion.valueOf() !== 'string') { throw new Error('applicationTypeVersion cannot be null or undefined and it must be of type string.'); } - if (serviceManifestName === null || serviceManifestName === undefined || typeof serviceManifestName.valueOf() !== 'string') { - throw new Error('serviceManifestName cannot be null or undefined and it must be of type string.'); + if (serviceTypeName === null || serviceTypeName === undefined || typeof serviceTypeName.valueOf() !== 'string') { + throw new Error('serviceTypeName cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -6480,12 +7053,12 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}'; requestUrl = requestUrl.replace('{applicationTypeName}', encodeURIComponent(applicationTypeName)); + requestUrl = requestUrl.replace('{serviceTypeName}', serviceTypeName); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); queryParameters.push('ApplicationTypeVersion=' + encodeURIComponent(applicationTypeVersion)); - queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -6514,7 +7087,7 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 204 && statusCode !== 404) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -6550,7 +7123,7 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceTypeManifest']().mapper(); + let resultMapper = new client.models['ServiceTypeInfo']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6560,40 +7133,47 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic return callback(deserializationError); } } + // Deserialize Response + if (statusCode === 204) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ServiceTypeInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the list containing the information about service types from - * the applications deployed on a node in a Service Fabric cluster. + * @summary Gets the manifest describing a service type. * - * 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. + * Gets the manifest describing a service type. The response contains the + * service manifest XML as a string. * - * @param {string} nodeName The name of the node. + * @param {string} applicationTypeName The name of the application type. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {string} applicationTypeVersion The version of the application type. * - * @param {object} [options] Optional Parameters. + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {string} [options.serviceManifestName] 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. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6604,13 +7184,14 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeManifest} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callback) { +function _getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -6620,19 +7201,18 @@ function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callb if (!callback) { throw new Error('callback cannot be null.'); } - let serviceManifestName = (options && options.serviceManifestName !== undefined) ? options.serviceManifestName : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate try { - if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { - throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + if (applicationTypeName === null || applicationTypeName === undefined || typeof applicationTypeName.valueOf() !== 'string') { + throw new Error('applicationTypeName cannot be null or undefined and it must be of type string.'); } - if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { - throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + if (applicationTypeVersion === null || applicationTypeVersion === undefined || typeof applicationTypeVersion.valueOf() !== 'string') { + throw new Error('applicationTypeVersion cannot be null or undefined and it must be of type string.'); } - if (serviceManifestName !== null && serviceManifestName !== undefined && typeof serviceManifestName.valueOf() !== 'string') { - throw new Error('serviceManifestName must be of type string.'); + if (serviceManifestName === null || serviceManifestName === undefined || typeof serviceManifestName.valueOf() !== 'string') { + throw new Error('serviceManifestName cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -6653,14 +7233,12 @@ function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callb // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'; - requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); - requestUrl = requestUrl.replace('{applicationId}', applicationId); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ApplicationTypes/{applicationTypeName}/$/GetServiceManifest'; + requestUrl = requestUrl.replace('{applicationTypeName}', encodeURIComponent(applicationTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (serviceManifestName !== null && serviceManifestName !== undefined) { - queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); - } + queryParameters.push('ApplicationTypeVersion=' + encodeURIComponent(applicationTypeVersion)); + queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -6725,21 +7303,7 @@ function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callb parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'DeployedServiceTypeInfoElementType', - type: { - name: 'Composite', - className: 'DeployedServiceTypeInfo' - } - } - } - }; + let resultMapper = new client.models['ServiceTypeManifest']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6755,27 +7319,24 @@ function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callb } /** - * @summary Gets the information about a specified service type of the - * application deployed on a node in a Service Fabric cluster. + * @summary 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 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. + * 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric - * service type. * * @param {object} [options] Optional Parameters. * @@ -6785,9 +7346,205 @@ function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callb * types that are defined in this service manifest. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let serviceManifestName = (options && options.serviceManifestName !== undefined) ? options.serviceManifestName : undefined; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (serviceManifestName !== null && serviceManifestName !== undefined && typeof serviceManifestName.valueOf() !== 'string') { + throw new Error('serviceManifestName must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (serviceManifestName !== null && serviceManifestName !== undefined) { + queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DeployedServiceTypeInfoElementType', + type: { + name: 'Composite', + className: 'DeployedServiceTypeInfo' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6960,15 +7717,28 @@ function _getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeN * @param {object} applicationDescription Description for creating an * application. * - * @param {string} applicationDescription.name + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. * - * @param {string} applicationDescription.typeName + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. * - * @param {string} applicationDescription.typeVersion + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {array} [applicationDescription.parameterList] + * @param {object} [applicationDescription.applicationCapacity] 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 {object} [applicationDescription.applicationCapacity] * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * The minimum number of nodes where Service Fabric will reserve capacity for @@ -6985,14 +7755,15 @@ function _getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeN * node. * * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7129,20 +7900,22 @@ function _createApplication(applicationDescription, options, callback) { * * 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 + * 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 service is having issues closing the replica gracefully, - * the delete operation may take a long time or get stuck. Use the optional - * ForceRemove flag to skip the graceful close sequence and forcefully delete - * the application and all of the its services. + * service. However, if a service is having issues closing the replica + * gracefully, the delete operation may take a long time or get stuck. Use the + * optional ForceRemove flag to skip the graceful close sequence and forcefully + * delete the application and all of the its services. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -7152,9 +7925,9 @@ function _createApplication(applicationDescription, options, callback) { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7286,22 +8059,25 @@ function _deleteApplication(applicationId, options, callback) { * 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 app is occupying - * currently, and application load metric information about the application. + * minimum nodes, maximum nodes, the number of nodes the application is + * occupying currently, and application load metric information about the + * application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7440,21 +8216,23 @@ function _getApplicationLoadInfo(applicationId, options, callback) { /** * @summary Gets the list of applications created in the Service Fabric cluster - * that match filters specified as the parameter. + * 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 filters - * specified as the parameter. 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. + * 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 {object} [options] Optional Parameters. * * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind for application query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationDefinitionKind value. The value is 0. + * 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 @@ -7479,10 +8257,18 @@ function _getApplicationLoadInfo(applicationId, options, callback) { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7511,12 +8297,13 @@ function _getApplicationInfoList(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let applicationDefinitionKindFilter = (options && options.applicationDefinitionKindFilter !== undefined) ? options.applicationDefinitionKindFilter : 65535; + let applicationDefinitionKindFilter = (options && options.applicationDefinitionKindFilter !== undefined) ? options.applicationDefinitionKindFilter : 0; let applicationTypeName = (options && options.applicationTypeName !== undefined) ? options.applicationTypeName : undefined; let excludeApplicationParameters = (options && options.excludeApplicationParameters !== undefined) ? options.excludeApplicationParameters : false; let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.1'; // Validate try { if (applicationDefinitionKindFilter !== null && applicationDefinitionKindFilter !== undefined && typeof applicationDefinitionKindFilter !== 'number') { @@ -7531,6 +8318,15 @@ function _getApplicationInfoList(options, callback) { if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { throw new Error('continuationToken must be of type string.'); } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -7565,6 +8361,9 @@ function _getApplicationInfoList(options, callback) { if (continuationToken !== null && continuationToken !== undefined) { queryParameters.push('ContinuationToken=' + continuationToken); } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -7655,19 +8454,21 @@ function _getApplicationInfoList(options, callback) { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7816,15 +8617,17 @@ function _getApplicationInfo(applicationId, options, callback) { * * 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 helath store, it will return Error. + * in the health store, it will return Error. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -7856,7 +8659,7 @@ function _getApplicationInfo(applicationId, options, callback) { * 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.\ + * 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 @@ -7909,9 +8712,9 @@ function _getApplicationInfo(applicationId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8088,10 +8891,12 @@ function _getApplicationHealth(applicationId, options, callback) { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8123,7 +8928,7 @@ function _getApplicationHealth(applicationId, options, callback) { * 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.\ + * 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 @@ -8200,7 +9005,8 @@ function _getApplicationHealth(applicationId, options, callback) { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -8249,11 +9055,13 @@ function _getApplicationHealth(applicationId, options, callback) { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8452,10 +9260,12 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -8480,11 +9290,13 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -8519,7 +9331,7 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -8536,15 +9348,15 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * 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 + * 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. + * 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 + * 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 + * 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 @@ -8553,9 +9365,9 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8707,53 +9519,102 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application * upgrade. * - * @param {string} applicationUpgradeDescription.name + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. * * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. * - * @param {array} applicationUpgradeDescription.parameters + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. * - * @param {string} applicationUpgradeDescription.upgradeKind Possible values - * include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). * - * @param {boolean} [applicationUpgradeDescription.forceRestart] + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -8775,6 +9636,7 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -8824,13 +9686,15 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8975,16 +9839,18 @@ function _startApplicationUpgrade(applicationId, applicationUpgradeDescription, * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9134,20 +10000,27 @@ function _getApplicationUpgrade(applicationId, options, callback) { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * - * @param {string} applicationUpgradeUpdateDescription.name + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] @@ -9169,6 +10042,7 @@ function _getApplicationUpgrade(applicationId, options, callback) { * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -9218,45 +10092,87 @@ function _getApplicationUpgrade(applicationId, options, callback) { * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. * * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). * * @param {number} * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). * * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] 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' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9403,10 +10319,12 @@ function _updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescri * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -9416,9 +10334,9 @@ function _updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescri * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9561,22 +10479,24 @@ function _resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescri * Starts rolling back the current application upgrade to the previous version. * This API can only be used to rollback 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 + * upgraded use StartApplicationUpgrade API to upgrade it to desired version, * including rolling back to a previous version. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9698,16 +10618,48 @@ function _rollbackApplicationUpgrade(applicationId, options, callback) { /** * @summary Gets the list of applications deployed on a Service Fabric node. * - * 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 {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9718,7 +10670,9 @@ function _rollbackApplicationUpgrade(applicationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedDeployedApplicationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9735,7 +10689,10 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let includeHealthState = (options && options.includeHealthState !== undefined) ? options.includeHealthState : false; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let apiVersion = '6.1'; // Validate try { if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { @@ -9754,6 +10711,21 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); } } + if (includeHealthState !== null && includeHealthState !== undefined && typeof includeHealthState !== 'boolean') { + throw new Error('includeHealthState must be of type boolean.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } } catch (error) { return callback(error); } @@ -9767,6 +10739,15 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } + if (includeHealthState !== null && includeHealthState !== undefined) { + queryParameters.push('IncludeHealthState=' + encodeURIComponent(includeHealthState.toString())); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -9828,21 +10809,7 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'DeployedApplicationInfoElementType', - type: { - name: 'Composite', - className: 'DeployedApplicationInfo' - } - } - } - }; + let resultMapper = new client.models['PagedDeployedApplicationInfoList']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -9862,22 +10829,40 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { * Fabric node. * * Gets the information about an application deployed on a Service Fabric node. + * This query returns system application information if the application ID + * provided is for system application. Results encompass deployed applications + * in active, activating, and downloading states. This query requires that the + * node name corresponds to a node on the cluster. The query fails if the + * provided node name does not point to any active Service Fabric nodes on the + * cluster. + * * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9907,7 +10892,8 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let includeHealthState = (options && options.includeHealthState !== undefined) ? options.includeHealthState : false; + let apiVersion = '6.1'; // Validate try { if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { @@ -9929,6 +10915,9 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); } } + if (includeHealthState !== null && includeHealthState !== undefined && typeof includeHealthState !== 'boolean') { + throw new Error('includeHealthState must be of type boolean.'); + } } catch (error) { return callback(error); } @@ -9943,6 +10932,9 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } + if (includeHealthState !== null && includeHealthState !== undefined) { + queryParameters.push('IncludeHealthState=' + encodeURIComponent(includeHealthState.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -10034,10 +11026,12 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -10098,9 +11092,9 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10284,10 +11278,12 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -10365,7 +11361,8 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -10414,6 +11411,8 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -10423,9 +11422,9 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10626,10 +11625,12 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. @@ -10654,11 +11655,13 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -10693,7 +11696,7 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -10710,15 +11713,15 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * 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 + * 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. + * 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 + * 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 + * 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 @@ -10727,9 +11730,9 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10889,9 +11892,9 @@ function _reportDeployedApplicationHealth(nodeName, applicationId, healthInforma * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11043,10 +12046,12 @@ function _getApplicationManifest(applicationTypeName, applicationTypeVersion, op * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -11061,9 +12066,9 @@ function _getApplicationManifest(applicationTypeName, applicationTypeVersion, op * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11215,32 +12220,36 @@ function _getServiceInfoList(applicationId, options, callback) { } /** - * @summary Gets the information about the specific service belonging to a + * @summary Gets the information about the specific service belonging to the * Service Fabric application. * - * Returns the information about specified service belonging to the specified - * Service Fabric application. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11384,22 +12393,25 @@ function _getServiceInfo(applicationId, serviceId, options, callback) { /** * @summary Gets the name of the Service Fabric application for a service. * - * The GetApplicationName endpoint returns the name of the application for the - * specified 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11537,29 +12549,41 @@ function _getApplicationNameInfo(serviceId, options, callback) { } /** - * @summary Creates the specified service. + * @summary Creates the specified Service Fabric service. * - * Creates the specified 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceDescription The information necessary to create a * service. * - * @param {string} [serviceDescription.applicationName] + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceName + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * @param {string} serviceDescription.serviceTypeName + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * - * @param {array} [serviceDescription.initializationData] + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {object} serviceDescription.partitionDescription + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * * @param {string} serviceDescription.partitionDescription.partitionScheme * Polymorphic Discriminator @@ -11570,33 +12594,40 @@ function _getApplicationNameInfo(serviceId, options, callback) { * based on the service requirements. For example, to place a service on nodes * where NodeType is blue specify the following: "NodeColor == blue)". * - * @param {array} [serviceDescription.correlationScheme] + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceDescription.serviceLoadMetrics] + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * - * @param {array} [serviceDescription.servicePlacementPolicies] + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {string} [serviceDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' * * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates * if the DefaultMoveCost property is specified. * - * @param {string} [serviceDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceDescription.serviceDnsName] The DNS name of the * service. It requires the DNS system service to be enabled in Service Fabric * cluster. * + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. + * * @param {string} serviceDescription.serviceKind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11733,33 +12764,42 @@ function _createService(applicationId, serviceDescription, options, callback) { } /** - * @summary Creates a Service Fabric service from the service template defined - * in the application manifest. + * @summary Creates a Service Fabric service from the service template. * * Creates a Service Fabric service from the service template defined in the - * application manifest. + * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * - * @param {string} serviceFromTemplateDescription.applicationName + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceName + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. * - * @param {string} serviceFromTemplateDescription.serviceTypeName + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. * - * @param {array} [serviceFromTemplateDescription.initializationData] + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. * * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' * * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name * of the service. It requires the DNS system service to be enabled in Service @@ -11768,9 +12808,9 @@ function _createService(applicationId, serviceDescription, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -11910,19 +12950,21 @@ function _createServiceFromTemplate(applicationId, serviceFromTemplateDescriptio * @summary Deletes an existing Service Fabric service. * * Deletes an existing Service Fabric service. A service must be created before - * it can be deleted. By default Service Fabric will try to close service - * replicas in a graceful manner and then delete the service. However if + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -11932,9 +12974,9 @@ function _createServiceFromTemplate(applicationId, serviceFromTemplateDescriptio * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12061,17 +13103,28 @@ function _deleteService(serviceId, options, callback) { } /** - * @summary Updates the specified service using the given update description. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Updates the specified service using the given 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. Please 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -12106,6 +13159,8 @@ function _deleteService(serviceId, options, callback) { * 256. * - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value * is 512. + * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value + * is 1024. * * * @param {string} [serviceUpdateDescription.placementConstraints] The @@ -12115,14 +13170,20 @@ function _deleteService(serviceId, options, callback) { * service on nodes where NodeType is blue specify the following: "NodeColor == * blue)". * - * @param {array} [serviceUpdateDescription.correlationScheme] + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. * - * @param {array} [serviceUpdateDescription.loadMetrics] + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. * * @param {string} serviceUpdateDescription.serviceKind Polymorphic * Discriminator @@ -12130,9 +13191,9 @@ function _deleteService(serviceId, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12275,18 +13336,20 @@ function _updateService(serviceId, serviceUpdateDescription, options, callback) * be created before its description can be obtained. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12432,16 +13495,18 @@ function _getServiceDescription(serviceId, options, callback) { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -12501,9 +13566,9 @@ function _getServiceDescription(serviceId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -12676,16 +13741,18 @@ function _getServiceHealth(serviceId, options, callback) { * Use PartitionsHealthStateFilter to filter the collection of partitions * returned. * If you specify a service that does not exist in the health store, this - * cmdlet returns an error. + * request returns an error. * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -12762,7 +13829,8 @@ function _getServiceHealth(serviceId, options, callback) { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -12811,6 +13879,8 @@ function _getServiceHealth(serviceId, options, callback) { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -12820,9 +13890,9 @@ function _getServiceHealth(serviceId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13013,12 +14083,14 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} healthInformation 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. @@ -13043,11 +14115,13 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -13082,7 +14156,7 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -13099,15 +14173,15 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * 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 + * 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. + * 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 + * 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 + * 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 @@ -13116,9 +14190,9 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13264,30 +14338,32 @@ function _reportServiceHealth(serviceId, healthInformation, options, callback) { /** * @summary Resolve a Service Fabric partition. * - * Resolve a Service Fabric service partition, to get the endpoints of the + * Resolve a Service Fabric service partition to get the endpoints of the * service replicas. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] 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 the PartitionKeyValue parameter is not + * - 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 the PartitionKeyValue parameter is an + * - 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 the PartitionKeyValue parameter is a name - * of the partition. This is valid for the partitions with partitioning scheme - * as Named. The value is 3. + * - 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. * * * @param {string} [options.partitionKeyValue] Partition key. This is required @@ -13298,9 +14374,9 @@ function _reportServiceHealth(serviceId, healthInformation, options, callback) { * knows that the result that was got previously is stale. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13463,16 +14539,18 @@ function _resolveService(serviceId, options, callback) { * @summary Gets the list of partitions of a Service Fabric service. * * Gets the list of partitions of a Service Fabric service. The response - * include the partition id, partitioning scheme information, keys supported by - * the partition, status, health and other details about the partition. + * includes the partition ID, partitioning scheme information, keys supported + * by the partition, status, health, and other details about the partition. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -13484,9 +14562,9 @@ function _resolveService(serviceId, options, callback) { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13634,19 +14712,18 @@ function _getPartitionInfoList(serviceId, options, callback) { /** * @summary Gets the information about a Service Fabric partition. * - * The Partitions endpoint returns information about the specified partition. - * The response include the partition id, partitioning scheme information, keys - * supported by the partition, status, health and other details about the - * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13786,17 +14863,17 @@ function _getPartitionInfo(partitionId, options, callback) { /** * @summary Gets the name of the Service Fabric service for a partition. * - * The GetServiceName endpoint returns the name of the service for the - * specified 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13942,7 +15019,7 @@ function _getServiceNameInfo(partitionId, options, callback) { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -14005,9 +15082,9 @@ function _getServiceNameInfo(partitionId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14181,7 +15258,7 @@ function _getPartitionHealth(partitionId, options, callback) { * 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 - * cmdlet returns an error. + * request returns an error. * * * @param {uuid} partitionId The identity of the partition. @@ -14261,7 +15338,8 @@ function _getPartitionHealth(partitionId, options, callback) { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -14310,6 +15388,8 @@ function _getPartitionHealth(partitionId, options, callback) { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by @@ -14319,9 +15399,9 @@ function _getPartitionHealth(partitionId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14537,11 +15617,13 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -14576,7 +15658,7 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -14593,15 +15675,15 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * 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 + * 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. + * 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 + * 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 + * 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 @@ -14610,9 +15692,9 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14756,11 +15838,12 @@ function _reportPartitionHealth(partitionId, healthInformation, options, callbac } /** - * @summary Gets the load of the specified Service Fabric partition. + * @summary Gets the load information of the specified Service Fabric + * partition. * - * Returns information about the specified partition. - * The response includes a list of load information. - * Each information includes load metric name, value and last reported time in + * 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. * * @@ -14769,9 +15852,9 @@ function _reportPartitionHealth(partitionId, healthInformation, options, callbac * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14920,9 +16003,9 @@ function _getPartitionLoadInformation(partitionId, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15056,9 +16139,9 @@ function _resetPartitionLoad(partitionId, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15188,18 +16271,20 @@ function _recoverPartition(partitionId, options, callback) { * loss. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15331,9 +16416,9 @@ function _recoverServicePartitions(serviceId, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15462,9 +16547,9 @@ function _recoverSystemPartitions(options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15621,25 +16706,9 @@ function _recoverAllPartitions(options, callback) { * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -15652,7 +16721,11 @@ function _recoverAllPartitions(options, callback) { * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -15662,29 +16735,19 @@ function _recoverAllPartitions(options, callback) { * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -15698,7 +16761,10 @@ function _recoverAllPartitions(options, callback) { * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -15733,11 +16799,15 @@ function _recoverAllPartitions(options, callback) { * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -15896,12 +16966,12 @@ function _createRepairTask(repairTask, options, callback) { * @param {string} [repairTaskCancelDescription.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. + * zero, then no version check is performed. * * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * not yet started. * * @param {object} [options] Optional Parameters. * @@ -16359,7 +17429,7 @@ function _getRepairTaskList(options, callback) { * @param {string} [repairTaskApproveDescription.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. + * zero, then no version check is performed. * * @param {object} [options] Optional Parameters. * @@ -16685,25 +17755,9 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * * * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * Valid initial states are Created, Claimed, and Preparing. Possible values + * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', + * 'Executing', 'Restoring', 'Completed' * * @param {number} [repairTask.flags] A bitwise-OR of the following values, * which gives additional details about the status of the repair task. @@ -16716,7 +17770,11 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * specified when the repair task is created, and is immutable once set. * * - * @param {object} [repairTask.target] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.target.kind Polymorphic Discriminator * @@ -16726,29 +17784,19 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * @param {string} [repairTask.executorData] A data string that the repair * executor can use to store its internal state. * - * @param {object} [repairTask.impact] + * @param {object} [repairTask.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. + * * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * 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' * * @param {number} [repairTask.resultCode] A numeric value providing additional * details about the result of the repair task execution. @@ -16762,7 +17810,10 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * set. * * - * @param {object} [repairTask.history] + * @param {object} [repairTask.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. + * * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. @@ -16797,11 +17848,15 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * * @param {boolean} [repairTask.performPreparingHealthCheck] A value to * determine if health checks will be performed when the repair task enters the @@ -16949,8 +18004,8 @@ function _updateRepairExecutionState(repairTask, options, callback) { * partition. * * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The respons include the id, role, status, health, node - * name, uptime, and other details about the replica. + * specified partition. The response includes the id, role, status, health, + * node name, uptime, and other details about the replica. * * @param {uuid} partitionId The identity of the partition. * @@ -16965,9 +18020,9 @@ function _updateRepairExecutionState(repairTask, options, callback) { * this parameter should not be URL encoded. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17114,7 +18169,7 @@ function _getReplicaInfoList(partitionId, options, callback) { /** * @summary Gets the information about a replica of a Service Fabric partition. * - * The respons include the id, role, status, health, node name, uptime, and + * The response includes the id, role, status, health, node name, uptime, and * other details about the replica. * * @param {uuid} partitionId The identity of the partition. @@ -17123,18 +18178,10 @@ function _getReplicaInfoList(partitionId, options, callback) { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17162,7 +18209,6 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate @@ -17173,9 +18219,6 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { if (replicaId === null || replicaId === undefined || typeof replicaId.valueOf() !== 'string') { throw new Error('replicaId cannot be null or undefined and it must be of type string.'); } - if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { - throw new Error('continuationToken must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -17200,9 +18243,6 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { requestUrl = requestUrl.replace('{replicaId}', replicaId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (continuationToken !== null && continuationToken !== undefined) { - queryParameters.push('ContinuationToken=' + continuationToken); - } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -17322,9 +18362,9 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17541,7 +18581,8 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -17590,11 +18631,13 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17778,14 +18821,9 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * * @param {string} replicaId The identifier of the replica. * - * @param {string} serviceKind The kind of service replica (Stateless or - * Stateful) for which the health is being reported. Following are the possible - * values. - * - Stateless - Does not use Service Fabric to make its state highly available - * or reliable. The value is 1 - * - Stateful - Uses Service Fabric to make its state or part of its state - * highly available and reliable. The value is 2. - * . Possible values include: 'Stateless', 'Stateful' + * @param {string} replicaHealthReportServiceKind 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' * * @param {object} healthInformation Describes the health information for the * health report. This information needs to be present in all of the health @@ -17811,11 +18849,13 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -17850,7 +18890,7 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -17867,15 +18907,15 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * 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 + * 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. + * 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 + * 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 + * 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 @@ -17884,9 +18924,9 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -17903,7 +18943,7 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInformation, options, callback) { +function _reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -17924,8 +18964,8 @@ function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInforma if (replicaId === null || replicaId === undefined || typeof replicaId.valueOf() !== 'string') { throw new Error('replicaId cannot be null or undefined and it must be of type string.'); } - if (serviceKind === null || serviceKind === undefined || typeof serviceKind.valueOf() !== 'string') { - throw new Error('serviceKind cannot be null or undefined and it must be of type string.'); + if (replicaHealthReportServiceKind === null || replicaHealthReportServiceKind === undefined || typeof replicaHealthReportServiceKind.valueOf() !== 'string') { + throw new Error('replicaHealthReportServiceKind cannot be null or undefined and it must be of type string.'); } if (healthInformation === null || healthInformation === undefined) { throw new Error('healthInformation cannot be null or undefined.'); @@ -17957,7 +18997,7 @@ function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInforma requestUrl = requestUrl.replace('{replicaId}', replicaId); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('ServiceKind=' + encodeURIComponent(serviceKind)); + queryParameters.push('ReplicaHealthReportServiceKind=' + encodeURIComponent(replicaHealthReportServiceKind)); if (immediate !== null && immediate !== undefined) { queryParameters.push('Immediate=' + encodeURIComponent(immediate.toString())); } @@ -18041,8 +19081,8 @@ function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInforma * @summary 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 + * 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. @@ -18052,10 +19092,12 @@ function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInforma * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -18064,9 +19106,9 @@ function _reportReplicaHealth(partitionId, replicaId, serviceKind, healthInforma * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18244,8 +19286,8 @@ function _getDeployedServiceReplicaInfoList(nodeName, applicationId, options, ca * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -18256,9 +19298,9 @@ function _getDeployedServiceReplicaInfoList(nodeName, applicationId, options, ca * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18409,8 +19451,8 @@ function _getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, * * Gets the details of the replica deployed on a Service Fabric node. The * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * * @param {string} nodeName The name of the node. * @@ -18419,9 +19461,9 @@ function _getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18580,9 +19622,9 @@ function _getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18737,9 +19779,9 @@ function _restartReplica(nodeName, partitionId, replicaId, options, callback) { * prevents graceful close of replicas. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -18885,16 +19927,18 @@ function _removeReplica(nodeName, partitionId, replicaId, options, callback) { * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19062,18 +20106,20 @@ function _getDeployedServicePackageInfoList(nodeName, applicationId, options, ca * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19245,10 +20291,12 @@ function _getDeployedServicePackageInfoListByName(nodeName, applicationId, servi * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -19278,9 +20326,9 @@ function _getDeployedServicePackageInfoListByName(nodeName, applicationId, servi * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19453,10 +20501,12 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -19510,7 +20560,8 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * * * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -19559,11 +20610,13 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19754,10 +20807,12 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -19784,11 +20839,13 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * information. * * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using ISO8601 + * 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. @@ -19823,7 +20880,7 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates * whether the report is removed from health store when it expires. - * If set to true, the report is remopved from the health store after it + * 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. @@ -19840,15 +20897,15 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * 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 + * 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. + * 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 + * 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 + * 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 @@ -19857,9 +20914,9 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20011,11 +21068,15 @@ function _reportDeployedServicePackageHealth(nodeName, applicationId, servicePac } /** - * @summary Downloads packages associated with specified service manifest to - * image cache on specified node. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * Downloads packages associated with specified service manifest to image cache - * on 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 {string} nodeName The name of the node. @@ -20024,21 +21085,26 @@ function _reportDeployedServicePackageHealth(nodeName, applicationId, servicePac * for deploying a service package to a Service Fabric node. * * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. * * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. * * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. * - * @param {string} deployServicePackageToNodeDescription.nodeName + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. * * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20055,7 +21121,7 @@ function _reportDeployedServicePackageHealth(nodeName, applicationId, servicePac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, callback) { +function _deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -20185,10 +21251,12 @@ function _deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescr * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -20199,9 +21267,9 @@ function _deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescr * Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20382,28 +21450,49 @@ function _getDeployedCodePackageInfoList(nodeName, applicationId, options, callb * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. * * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] + * [restartDeployedCodePackageDescription.servicePackageActivationId] 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. * - * @param {string} restartDeployedCodePackageDescription.codePackageName + * + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * 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. + * * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20544,170 +21633,592 @@ function _restartDeployedCodePackage(nodeName, applicationId, restartDeployedCod } /** - * @summary Creates a Service Fabric compose deployment. - * - * Creates a Service Fabric compose deployment. - * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. - * - * @param {string} createComposeDeploymentDescription.deploymentName - * - * @param {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. - * - * @param {object} [createComposeDeploymentDescription.registryCredential] - * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. - * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryPassword] The - * password for supplied username to connect to container registry. - * - * @param {boolean} - * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _createComposeDeployment(createComposeDeploymentDescription, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0-preview'; - // Validate - try { - if (createComposeDeploymentDescription === null || createComposeDeploymentDescription === undefined) { - throw new Error('createComposeDeploymentDescription cannot be null or undefined.'); - } - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - if (timeout !== null && timeout !== undefined) { - if (timeout > 4294967295) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); - } - if (timeout < 1) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ComposeDeployments/$/Create'; - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (createComposeDeploymentDescription !== null && createComposeDeploymentDescription !== undefined) { - let requestModelMapper = new client.models['CreateComposeDeploymentDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, createComposeDeploymentDescription, 'createComposeDeploymentDescription'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(createComposeDeploymentDescription, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 202) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - - return callback(null, result, httpRequest, response); - }); -} - -/** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerLogs} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let tail = (options && options.tail !== undefined) ? options.tail : undefined; + let previous = (options && options.previous !== undefined) ? options.previous : false; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (serviceManifestName === null || serviceManifestName === undefined || typeof serviceManifestName.valueOf() !== 'string') { + throw new Error('serviceManifestName cannot be null or undefined and it must be of type string.'); + } + if (codePackageName === null || codePackageName === undefined || typeof codePackageName.valueOf() !== 'string') { + throw new Error('codePackageName cannot be null or undefined and it must be of type string.'); + } + if (tail !== null && tail !== undefined && typeof tail.valueOf() !== 'string') { + throw new Error('tail must be of type string.'); + } + if (previous !== null && previous !== undefined && typeof previous !== 'boolean') { + throw new Error('previous must be of type boolean.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); + queryParameters.push('CodePackageName=' + encodeURIComponent(codePackageName)); + if (tail !== null && tail !== undefined) { + queryParameters.push('Tail=' + encodeURIComponent(tail)); + } + if (previous !== null && previous !== undefined) { + queryParameters.push('Previous=' + encodeURIComponent(previous.toString())); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ContainerLogs']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ContainerApiResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (serviceManifestName === null || serviceManifestName === undefined || typeof serviceManifestName.valueOf() !== 'string') { + throw new Error('serviceManifestName cannot be null or undefined and it must be of type string.'); + } + if (codePackageName === null || codePackageName === undefined || typeof codePackageName.valueOf() !== 'string') { + throw new Error('codePackageName cannot be null or undefined and it must be of type string.'); + } + if (codePackageInstanceId === null || codePackageInstanceId === undefined || typeof codePackageInstanceId.valueOf() !== 'string') { + throw new Error('codePackageInstanceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (containerApiRequestBody === null || containerApiRequestBody === undefined) { + throw new Error('containerApiRequestBody cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); + queryParameters.push('CodePackageName=' + encodeURIComponent(codePackageName)); + queryParameters.push('CodePackageInstanceId=' + encodeURIComponent(codePackageInstanceId)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (containerApiRequestBody !== null && containerApiRequestBody !== undefined) { + let requestModelMapper = new client.models['ContainerApiRequestBody']().mapper(); + requestModel = client.serialize(requestModelMapper, containerApiRequestBody, 'containerApiRequestBody'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(containerApiRequestBody, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ContainerApiResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 it's status can + * be tracked via `GetComposeDeploymentStatus` API. + * + * @param {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. + * + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. + * + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryPassword] The + * password for supplied username to connect to container registry. + * + * @param {boolean} + * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createComposeDeployment(createComposeDeploymentDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0-preview'; + // Validate + try { + if (createComposeDeploymentDescription === null || createComposeDeploymentDescription === undefined) { + throw new Error('createComposeDeploymentDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ComposeDeployments/$/Create'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (createComposeDeploymentDescription !== null && createComposeDeploymentDescription !== undefined) { + let requestModelMapper = new client.models['CreateComposeDeploymentDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, createComposeDeploymentDescription, 'createComposeDeploymentDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(createComposeDeploymentDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** * @summary Gets information about a Service Fabric compose deployment. * * Returns the status of the compose deployment that was created or in the @@ -20720,9 +22231,9 @@ function _createComposeDeployment(createComposeDeploymentDescription, options, c * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20886,13 +22397,13 @@ function _getComposeDeploymentStatus(deploymentName, options, callback) { * 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 queries includes as much + * parameter is zero or not specified, the paged queries includes as many * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21058,9 +22569,9 @@ function _getComposeDeploymentStatusList(options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21208,9 +22719,9 @@ function _getComposeDeploymentUpgradeProgress(deploymentName, options, callback) * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21341,12 +22852,14 @@ function _removeComposeDeployment(deploymentName, options, callback) { * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading * compose deployment. * - * @param {string} composeDeploymentUpgradeDescription.deploymentName + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. * * @param {string} composeDeploymentUpgradeDescription.composeFileContent The * content of the compose file that describes the deployment to create. * * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. * * @param {string} * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] @@ -21360,41 +22873,83 @@ function _removeComposeDeployment(deploymentName, options, callback) { * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] * Indicates that supplied container registry password is encrypted. * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * * @param {number} * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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). * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). * * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. * * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] 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' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. * * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] @@ -21416,6 +22971,7 @@ function _removeComposeDeployment(deploymentName, options, callback) { * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] @@ -21465,13 +23021,15 @@ function _removeComposeDeployment(deploymentName, options, callback) { * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21608,15 +23166,161 @@ function _startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgrade } /** - * @summary Starts Chaos in the cluster. + * @summary Get the status of Chaos. * - * 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. - * Please refer to the article [Induce controlled Chaos in Service Fabric - * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) - * for more details. + * 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Chaos} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getChaos(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Tools/Chaos'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Chaos']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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. + * Please refer to the article [Induce controlled Chaos in Service Fabric + * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) + * for more details. * * * @param {object} chaosParameters Describes all the parameters to configure a @@ -21663,7 +23367,12 @@ function _startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgrade * The larger the value, the lower the fault injection rate. * * - * @param {object} [chaosParameters.clusterHealthPolicy] + * @param {object} [chaosParameters.clusterHealthPolicy] 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. + * * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates @@ -21706,18 +23415,93 @@ function _startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgrade * * * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * - * @param {object} [chaosParameters.context] + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * + * + * @param {object} [chaosParameters.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. + * + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * + * @param {object} [chaosParameters.chaosTargetFilter] 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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. * - * @param {object} [chaosParameters.context.map] * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21850,18 +23634,23 @@ function _startChaos(chaosParameters, options, callback) { } /** - * @summary Stops Chaos in the cluster if it is already running, otherwise it - * does nothing. + * @summary 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. * - * Stops Chaos from scheduling further faults; but, the in-flight faults are - * not affected. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -21977,15 +23766,18 @@ function _stopChaos(options, callback) { } /** - * @summary Gets the next segment of the Chaos report based on the passed-in - * continuation token or the passed-in time-range. + * @summary Gets the next segment of the Chaos events based on the continuation + * token or the time range. * - * You can either specify the ContinuationToken to get the next segment of the - * Chaos report or you can specify the time-range - * through StartTimeUtc and EndTimeUtc, but you cannot specify both the - * ContinuationToken and the time-range in the same call. - * When there are more than 100 Chaos events, the Chaos report is returned in - * segments where a segment contains no more than 100 Chaos events. + * 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 {object} [options] Optional Parameters. @@ -21998,22 +23790,30 @@ function _stopChaos(options, callback) { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The count of ticks representing the - * start time of the time range for which a Chaos report is to be generated. - * Please consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * - * @param {string} [options.endTimeUtc] The count of ticks representing the end - * time of the time range for which a Chaos report is to be generated. Please - * consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22025,13 +23825,13 @@ function _stopChaos(options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ChaosReport} for more information. + * See {@link ChaosEventsSegment} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getChaosReport(options, callback) { +function _getChaosEvents(options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22044,8 +23844,9 @@ function _getChaosReport(options, callback) { let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; let startTimeUtc = (options && options.startTimeUtc !== undefined) ? options.startTimeUtc : undefined; let endTimeUtc = (options && options.endTimeUtc !== undefined) ? options.endTimeUtc : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.2'; // Validate try { if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { @@ -22057,6 +23858,15 @@ function _getChaosReport(options, callback) { if (endTimeUtc !== null && endTimeUtc !== undefined && typeof endTimeUtc.valueOf() !== 'string') { throw new Error('endTimeUtc must be of type string.'); } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -22076,7 +23886,7 @@ function _getChaosReport(options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Tools/Chaos/$/Report'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Tools/Chaos/Events'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (continuationToken !== null && continuationToken !== undefined) { @@ -22088,6 +23898,9 @@ function _getChaosReport(options, callback) { if (endTimeUtc !== null && endTimeUtc !== undefined) { queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -22152,7 +23965,7 @@ function _getChaosReport(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ChaosReport']().mapper(); + let resultMapper = new client.models['ChaosEventsSegment']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -22168,31 +23981,14 @@ function _getChaosReport(options, callback) { } /** - * @summary 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. + * @summary 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 {string} contentPath Relative path to file or folder in the image - * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -22202,13 +23998,15 @@ function _getChaosReport(options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ChaosScheduleDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _uploadFile(contentPath, options, callback) { +function _getChaosSchedule(options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22218,46 +24016,20 @@ function _uploadFile(contentPath, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; - // Validate - try { - if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { - throw new Error('contentPath cannot be null or undefined and it must be of type string.'); - } - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - if (timeout !== null && timeout !== undefined) { - if (timeout > 4294967295) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); - } - if (timeout < 1) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - } catch (error) { - return callback(error); - } + let apiVersion = '6.2'; // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}'; - requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Tools/Chaos/Schedule'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -22305,26 +24077,66 @@ function _uploadFile(contentPath, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ChaosScheduleDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the image store content information. + * @summary Set the schedule used by Chaos. * - * Returns the information about the image store content at the specified - * contentPath relative to the root of the image store. + * Set the Chaos Schedule currently in use by Chaos. Chaos will automatically + * schedule runs based on the Chaos Schedule. + * The version in the provided input schedule must match the version of the + * Chaos Schedule on the server. + * If the version provided does not match the version on the server, the Chaos + * Schedule is not updated. + * If the version provided matches the version on the server, then the Chaos + * Schedule is updated and the version of the Chaos Schedule on the server is + * incremented up by one and wraps back to 0 after 2,147,483,647. + * If Chaos is running when this call is made, the call will fail. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. * - * @param {object} [options] Optional Parameters. + * @param {object} chaosSchedule Describes the schedule used by Chaos. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {number} [chaosSchedule.version] The version number of the Schedule. + * + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. + * + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. + * + * + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. + * + * + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + * + * + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. + * + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22335,14 +24147,13 @@ function _uploadFile(contentPath, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageStoreContent} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImageStoreContent(contentPath, options, callback) { +function _postChaosSchedule(chaosSchedule, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22352,25 +24163,11 @@ function _getImageStoreContent(contentPath, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.2'; // Validate try { - if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { - throw new Error('contentPath cannot be null or undefined and it must be of type string.'); - } - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - if (timeout !== null && timeout !== undefined) { - if (timeout > 4294967295) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); - } - if (timeout < 1) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); - } + if (chaosSchedule === null || chaosSchedule === undefined) { + throw new Error('chaosSchedule cannot be null or undefined.'); } } catch (error) { return callback(error); @@ -22378,20 +24175,16 @@ function _getImageStoreContent(contentPath, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}'; - requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Tools/Chaos/Schedule'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -22403,7 +24196,21 @@ function _getImageStoreContent(contentPath, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (chaosSchedule !== null && chaosSchedule !== undefined) { + let requestModelMapper = new client.models['ChaosScheduleDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, chaosSchedule, 'chaosSchedule'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(chaosSchedule, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -22439,34 +24246,26 @@ function _getImageStoreContent(contentPath, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageStoreContent']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Deletes existing image store content. + * @summary 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. * - * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application - * packages once they are provisioned. * * @param {string} contentPath Relative path to file or folder in the image * store from its root. @@ -22474,9 +24273,9 @@ function _getImageStoreContent(contentPath, options, callback) { * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22493,7 +24292,7 @@ function _getImageStoreContent(contentPath, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImageStoreContent(contentPath, options, callback) { +function _uploadFile(contentPath, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22542,7 +24341,7 @@ function _deleteImageStoreContent(contentPath, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -22596,17 +24395,20 @@ function _deleteImageStoreContent(contentPath, options, callback) { } /** - * @summary Gets the content information at the root of the image store. + * @summary Gets the image store content information. * - * Returns the information about the image store content at the root of the - * image store. + * Returns the information about the image store content at the specified + * contentPath relative to the root of the image store. + * + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22624,7 +24426,7 @@ function _deleteImageStoreContent(contentPath, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImageStoreRootContent(options, callback) { +function _getImageStoreContent(contentPath, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22635,9 +24437,12 @@ function _getImageStoreRootContent(options, callback) { throw new Error('callback cannot be null.'); } let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; + let apiVersion = '6.2'; // Validate try { + if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { + throw new Error('contentPath cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -22657,7 +24462,8 @@ function _getImageStoreRootContent(options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}'; + requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -22740,35 +24546,21 @@ function _getImageStoreRootContent(options, callback) { } /** - * @summary 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 {object} imageStoreCopyDescription Describes the copy description for - * the image store. - * - * @param {string} imageStoreCopyDescription.remoteSource The relative path of - * source image store content to be copied from. - * - * @param {string} imageStoreCopyDescription.remoteDestination The relative - * path of destination image store content to be copied to. + * @summary Deletes existing image store content. * - * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file - * names to be skipped for copying. + * Deletes existing image store content being found within the given image + * store relative path. This can be used to delete uploaded application + * packages once they are provisioned. * - * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22785,7 +24577,7 @@ function _getImageStoreRootContent(options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { +function _deleteImageStoreContent(contentPath, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22799,8 +24591,8 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { let apiVersion = '6.0'; // Validate try { - if (imageStoreCopyDescription === null || imageStoreCopyDescription === undefined) { - throw new Error('imageStoreCopyDescription cannot be null or undefined.'); + if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { + throw new Error('contentPath cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -22821,7 +24613,8 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/$/Copy'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}'; + requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (timeout !== null && timeout !== undefined) { @@ -22833,7 +24626,7 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -22845,21 +24638,7 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (imageStoreCopyDescription !== null && imageStoreCopyDescription !== undefined) { - let requestModelMapper = new client.models['ImageStoreCopyDescription']().mapper(); - requestModel = client.serialize(requestModelMapper, imageStoreCopyDescription, 'imageStoreCopyDescription'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(imageStoreCopyDescription, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -22901,37 +24680,17 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { } /** - * @summary 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. - * + * @summary Gets the content information at the root of the image store. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * Returns the information about the image store content at the root of the + * image store. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22942,13 +24701,14 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageStoreContent} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _invokeInfrastructureCommand(command, options, callback) { +function _getImageStoreRootContent(options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -22958,17 +24718,10 @@ function _invokeInfrastructureCommand(command, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let serviceId = (options && options.serviceId !== undefined) ? options.serviceId : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate try { - if (command === null || command === undefined || typeof command.valueOf() !== 'string') { - throw new Error('command cannot be null or undefined and it must be of type string.'); - } - if (serviceId !== null && serviceId !== undefined && typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId must be of type string.'); - } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -22988,13 +24741,9 @@ function _invokeInfrastructureCommand(command, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/InvokeInfrastructureCommand'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('Command=' + encodeURIComponent(command)); - if (serviceId !== null && serviceId !== undefined) { - queryParameters.push('ServiceId=' + encodeURIComponent(serviceId)); - } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23004,7 +24753,7 @@ function _invokeInfrastructureCommand(command, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23059,13 +24808,7 @@ function _invokeInfrastructureCommand(command, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'String' - } - }; + let resultMapper = new client.models['ImageStoreContent']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -23081,37 +24824,35 @@ function _invokeInfrastructureCommand(command, options, callback) { } /** - * @summary Invokes a read-only query on the given infrastructure service - * instance. + * @summary Copies image store content internally * - * 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. + * Copies the image store content from the source image store relative path to + * the destination image store relative path. * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @param {object} imageStoreCopyDescription Describes the copy description for + * the image store. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @param {string} imageStoreCopyDescription.remoteSource The relative path of + * source image store content to be copied from. * + * @param {string} imageStoreCopyDescription.remoteDestination The relative + * path of destination image store content to be copied to. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file + * names to be skipped for copying. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23122,13 +24863,13 @@ function _invokeInfrastructureCommand(command, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _invokeInfrastructureQuery(command, options, callback) { +function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -23138,16 +24879,12 @@ function _invokeInfrastructureQuery(command, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let serviceId = (options && options.serviceId !== undefined) ? options.serviceId : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate try { - if (command === null || command === undefined || typeof command.valueOf() !== 'string') { - throw new Error('command cannot be null or undefined and it must be of type string.'); - } - if (serviceId !== null && serviceId !== undefined && typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId must be of type string.'); + if (imageStoreCopyDescription === null || imageStoreCopyDescription === undefined) { + throw new Error('imageStoreCopyDescription cannot be null or undefined.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -23168,13 +24905,9 @@ function _invokeInfrastructureQuery(command, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/InvokeInfrastructureQuery'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/$/Copy'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('Command=' + encodeURIComponent(command)); - if (serviceId !== null && serviceId !== undefined) { - queryParameters.push('ServiceId=' + encodeURIComponent(serviceId)); - } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23184,7 +24917,7 @@ function _invokeInfrastructureQuery(command, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23196,7 +24929,21 @@ function _invokeInfrastructureQuery(command, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (imageStoreCopyDescription !== null && imageStoreCopyDescription !== undefined) { + let requestModelMapper = new client.models['ImageStoreCopyDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, imageStoreCopyDescription, 'imageStoreCopyDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(imageStoreCopyDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -23232,88 +24979,28 @@ function _invokeInfrastructureQuery(command, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'String' - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary 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. + * @summary Cancels an image store upload session. * - * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - PartialDataLoss - PartialDataLoss option will cause a quorum of replicas - * to go down, triggering an OnDataLoss event in the system for the given - * partition. - * - FullDataLoss - FullDataLoss option will drop all the replicas which means - * that all the data will be lost. - * . Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23330,7 +25017,7 @@ function _invokeInfrastructureQuery(command, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, callback) { +function _deleteImageStoreUploadSession(sessionId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -23344,17 +25031,8 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (dataLossMode === null || dataLossMode === undefined || typeof dataLossMode.valueOf() !== 'string') { - throw new Error('dataLossMode cannot be null or undefined and it must be of type string.'); + if (sessionId === null || sessionId === undefined || typeof sessionId.valueOf() !== 'string' || !msRest.isValidUuid(sessionId)) { + throw new Error('sessionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -23375,13 +25053,10 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/$/DeleteUploadSession'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); - queryParameters.push('DataLossMode=' + encodeURIComponent(dataLossMode)); + queryParameters.push('session-id=' + encodeURIComponent(sessionId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23391,7 +25066,7 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23410,7 +25085,7 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -23445,31 +25120,24 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio } /** - * @summary Gets the progress of a partition data loss operation started using - * the StartDataLoss API. + * @summary Commit an image store upload session. * - * Gets the progress of a data loss operation started with StartDataLoss, using - * the OperationId. + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23480,15 +25148,13 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionDataLossProgress} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDataLossProgress(serviceId, partitionId, operationId, options, callback) { +function _commitImageStoreUploadSession(sessionId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -23502,14 +25168,8 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (sessionId === null || sessionId === undefined || typeof sessionId.valueOf() !== 'string' || !msRest.isValidUuid(sessionId)) { + throw new Error('sessionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -23530,12 +25190,10 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/$/CommitUploadSession'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('session-id=' + encodeURIComponent(sessionId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23545,7 +25203,7 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23593,72 +25251,28 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PartitionDataLossProgress']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Induces quorum loss for a given stateful service partition. - * - * Induces quorum loss for a given stateful service partition. This API is - * useful for a temporary quorum loss situation on your service. - * - * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @summary Get the image store upload session by ID. * - * @param {uuid} partitionId The identity of the partition. + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - QuorumReplicas - Partial Quorum loss mode : Minimum number of replicas for - * a partition will be down that will cause a quorum loss. - * - AllReplicas- Full Quorum loss mode : All replicas for a partition will be - * down that will cause a quorum loss. - * . Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' - * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23669,13 +25283,14 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, callback) { +function _getImageStoreUploadSessionById(sessionId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -23689,20 +25304,8 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (quorumLossMode === null || quorumLossMode === undefined || typeof quorumLossMode.valueOf() !== 'string') { - throw new Error('quorumLossMode cannot be null or undefined and it must be of type string.'); - } - if (quorumLossDuration === null || quorumLossDuration === undefined || typeof quorumLossDuration !== 'number') { - throw new Error('quorumLossDuration cannot be null or undefined and it must be of type number.'); + if (sessionId === null || sessionId === undefined || typeof sessionId.valueOf() !== 'string' || !msRest.isValidUuid(sessionId)) { + throw new Error('sessionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -23723,14 +25326,10 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/$/GetUploadSession'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); - queryParameters.push('QuorumLossMode=' + encodeURIComponent(quorumLossMode)); - queryParameters.push('QuorumLossDuration=' + encodeURIComponent(quorumLossDuration.toString())); + queryParameters.push('session-id=' + encodeURIComponent(sessionId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23740,7 +25339,7 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -23759,7 +25358,7 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -23788,37 +25387,45 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['UploadSession']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the progress of a quorum loss operation on a partition started - * using the StartQuorumLoss API. + * @summary Get the image store upload session by relative path. * - * Gets the progress of a quorum loss operation started with StartQuorumLoss, - * using the provided OperationId. - * - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * 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 {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23830,14 +25437,13 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionQuorumLossProgress} for more - * information. + * See {@link UploadSession} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getQuorumLossProgress(serviceId, partitionId, operationId, options, callback) { +function _getImageStoreUploadSessionByPath(contentPath, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -23851,14 +25457,8 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { + throw new Error('contentPath cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -23879,12 +25479,10 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}/$/GetUploadSession'; + requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -23949,7 +25547,7 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PartitionQuorumLossProgress']().mapper(); + let resultMapper = new client.models['UploadSession']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -23965,44 +25563,41 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca } /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. + * @summary Uploads a file chunk to the image store relative path. * - * This API is useful for testing failover. + * 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. * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. + * 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. * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. - * - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {uuid} sessionId 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. * - * @param {string} restartPartitionMode - Invalid - Reserved. Do not pass into - * API. - * - AllReplicasOrInstances - All replicas or instances in the partition are - * restarted at once. - * - OnlyActiveSecondaries - Only the secondary replicas are restarted. - * . Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' + * @param {string} contentRange 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24019,7 +25614,7 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, callback) { +function _uploadFileChunk(contentPath, sessionId, contentRange, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24033,17 +25628,14 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (contentPath === null || contentPath === undefined || typeof contentPath.valueOf() !== 'string') { + throw new Error('contentPath cannot be null or undefined and it must be of type string.'); } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (sessionId === null || sessionId === undefined || typeof sessionId.valueOf() !== 'string' || !msRest.isValidUuid(sessionId)) { + throw new Error('sessionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (restartPartitionMode === null || restartPartitionMode === undefined || typeof restartPartitionMode.valueOf() !== 'string') { - throw new Error('restartPartitionMode cannot be null or undefined and it must be of type string.'); + if (contentRange === null || contentRange === undefined || typeof contentRange.valueOf() !== 'string') { + throw new Error('contentRange cannot be null or undefined and it must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -24064,13 +25656,11 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'ImageStore/{contentPath}/$/UploadChunk'; + requestUrl = requestUrl.replace('{contentPath}', encodeURIComponent(contentPath)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); - queryParameters.push('RestartPartitionMode=' + encodeURIComponent(restartPartitionMode)); + queryParameters.push('session-id=' + encodeURIComponent(sessionId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24080,11 +25670,14 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (contentRange !== undefined && contentRange !== null) { + httpRequest.headers['Content-Range'] = contentRange; + } if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { @@ -24099,7 +25692,7 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -24134,31 +25727,37 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart } /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. + * @summary Invokes an administrative command on the given Infrastructure + * Service instance. * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. + * 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. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24169,15 +25768,13 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionRestartProgress} for more - * information. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getPartitionRestartProgress(serviceId, partitionId, operationId, options, callback) { +function _invokeInfrastructureCommand(command, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24187,18 +25784,16 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio if (!callback) { throw new Error('callback cannot be null.'); } + let serviceId = (options && options.serviceId !== undefined) ? options.serviceId : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate try { - if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { - throw new Error('serviceId cannot be null or undefined and it must be of type string.'); - } - if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { - throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (command === null || command === undefined || typeof command.valueOf() !== 'string') { + throw new Error('command cannot be null or undefined and it must be of type string.'); } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (serviceId !== null && serviceId !== undefined && typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -24219,12 +25814,13 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'; - requestUrl = requestUrl.replace('{serviceId}', serviceId); - requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/InvokeInfrastructureCommand'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('Command=' + encodeURIComponent(command)); + if (serviceId !== null && serviceId !== undefined) { + queryParameters.push('ServiceId=' + encodeURIComponent(serviceId)); + } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24234,7 +25830,7 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -24289,7 +25885,13 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PartitionRestartProgress']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -24305,44 +25907,37 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio } /** - * @summary 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. - * + * @summary Invokes a read-only query on the given infrastructure service + * instance. * - * @param {string} nodeName The name of the node. + * 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. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * Available commands and their corresponding response formats vary depending + * upon + * the infrastructure on which the cluster is running. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. - * - Invalid - Reserved. Do not pass into API. - * - Start - Transition a stopped node to up. - * - Stop - Transition an up node to stopped. - * . Possible values include: 'Invalid', 'Start', 'Stop' + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. * - * @param {number} stopDurationInSeconds 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. + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24353,13 +25948,13 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, callback) { +function _invokeInfrastructureQuery(command, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24369,30 +25964,16 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns if (!callback) { throw new Error('callback cannot be null.'); } + let serviceId = (options && options.serviceId !== undefined) ? options.serviceId : undefined; let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; let apiVersion = '6.0'; // Validate try { - if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { - throw new Error('nodeName cannot be null or undefined and it must be of type string.'); - } - if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { - throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (nodeTransitionType === null || nodeTransitionType === undefined || typeof nodeTransitionType.valueOf() !== 'string') { - throw new Error('nodeTransitionType cannot be null or undefined and it must be of type string.'); - } - if (nodeInstanceId === null || nodeInstanceId === undefined || typeof nodeInstanceId.valueOf() !== 'string') { - throw new Error('nodeInstanceId cannot be null or undefined and it must be of type string.'); - } - if (stopDurationInSeconds === null || stopDurationInSeconds === undefined || typeof stopDurationInSeconds !== 'number') { - throw new Error('stopDurationInSeconds cannot be null or undefined and it must be of type number.'); + if (command === null || command === undefined || typeof command.valueOf() !== 'string') { + throw new Error('command cannot be null or undefined and it must be of type string.'); } - if (stopDurationInSeconds !== null && stopDurationInSeconds !== undefined) { - if (stopDurationInSeconds < 0) - { - throw new Error('"stopDurationInSeconds" should satisfy the constraint - "InclusiveMinimum": 0'); - } + if (serviceId !== null && serviceId !== undefined && typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId must be of type string.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -24413,14 +25994,13 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Nodes/{nodeName}/$/StartTransition/'; - requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '$/InvokeInfrastructureQuery'; let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); - queryParameters.push('NodeTransitionType=' + encodeURIComponent(nodeTransitionType)); - queryParameters.push('NodeInstanceId=' + encodeURIComponent(nodeInstanceId)); - queryParameters.push('StopDurationInSeconds=' + encodeURIComponent(stopDurationInSeconds.toString())); + queryParameters.push('Command=' + encodeURIComponent(command)); + if (serviceId !== null && serviceId !== undefined) { + queryParameters.push('ServiceId=' + encodeURIComponent(serviceId)); + } if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24430,7 +26010,7 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -24449,7 +26029,7 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -24478,30 +26058,84 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'String' + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary This API will induce data loss for the specified partition. It will + * trigger a call to the OnDataLossAsync API of the partition. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * 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. * - * @param {string} nodeName The name of the node. + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24512,15 +26146,13 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeTransitionProgress} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getNodeTransitionProgress(nodeName, operationId, options, callback) { +function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24534,12 +26166,18 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { let apiVersion = '6.0'; // Validate try { - if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { - throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } + if (dataLossMode === null || dataLossMode === undefined || typeof dataLossMode.valueOf() !== 'string') { + throw new Error('dataLossMode cannot be null or undefined and it must be of type string.'); + } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); } @@ -24559,11 +26197,13 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Nodes/{nodeName}/$/GetTransitionProgress'; - requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('DataLossMode=' + encodeURIComponent(dataLossMode)); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24573,7 +26213,7 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -24592,7 +26232,7 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -24621,60 +26261,39 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['NodeTransitionProgress']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. + * @summary Gets the progress of a partition data loss operation started using + * the StartDataLoss API. * - * Gets the a list of user-induced fault operations filtered by provided input. + * Gets the progress of a data loss operation started with StartDataLoss, using + * the OperationId. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {number} stateFilter 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 * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24685,13 +26304,15 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionDataLossProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getFaultOperationList(typeFilter, stateFilter, options, callback) { +function _getDataLossProgress(serviceId, partitionId, operationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24705,11 +26326,14 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { let apiVersion = '6.0'; // Validate try { - if (typeFilter === null || typeFilter === undefined || typeof typeFilter !== 'number') { - throw new Error('typeFilter cannot be null or undefined and it must be of type number.'); + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); } - if (stateFilter === null || stateFilter === undefined || typeof stateFilter !== 'number') { - throw new Error('stateFilter cannot be null or undefined and it must be of type number.'); + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -24730,11 +26354,12 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - queryParameters.push('TypeFilter=' + encodeURIComponent(typeFilter.toString())); - queryParameters.push('StateFilter=' + encodeURIComponent(stateFilter.toString())); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24799,21 +26424,7 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'OperationStatusElementType', - type: { - name: 'Composite', - className: 'OperationStatus' - } - } - } - }; + let resultMapper = new client.models['PartitionDataLossProgress']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -24829,49 +26440,46 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { } /** - * @summary Cancels a user-induced fault operation. + * @summary Induces quorum loss for a given stateful service partition. * - * The following is a list of APIs that start fault operations that may be - * cancelled using CancelOperation - - * - StartDataLoss - * - StartQuorumLoss - * - StartPartitionRestart - * - StartNodeTransition + * Induces quorum loss for a given stateful service partition. This API is + * useful for a temporary quorum loss situation on your service. * - * 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/is be - * 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. + * 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. * - * Important note: if this API is invoked with force==true, internal state may - * be left behind. * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -24888,7 +26496,7 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _cancelOperation(operationId, force, options, callback) { +function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -24902,11 +26510,20 @@ function _cancelOperation(operationId, force, options, callback) { let apiVersion = '6.0'; // Validate try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (force === null || force === undefined || typeof force !== 'boolean') { - throw new Error('force cannot be null or undefined and it must be of type boolean.'); + if (quorumLossMode === null || quorumLossMode === undefined || typeof quorumLossMode.valueOf() !== 'string') { + throw new Error('quorumLossMode cannot be null or undefined and it must be of type string.'); + } + if (quorumLossDuration === null || quorumLossDuration === undefined || typeof quorumLossDuration !== 'number') { + throw new Error('quorumLossDuration cannot be null or undefined and it must be of type number.'); } if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { throw new Error('timeout must be of type number.'); @@ -24927,11 +26544,14 @@ function _cancelOperation(operationId, force, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/$/Cancel'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); - queryParameters.push('Force=' + encodeURIComponent(force.toString())); + queryParameters.push('QuorumLossMode=' + encodeURIComponent(quorumLossMode)); + queryParameters.push('QuorumLossDuration=' + encodeURIComponent(quorumLossDuration.toString())); if (timeout !== null && timeout !== undefined) { queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); } @@ -24960,7 +26580,7 @@ function _cancelOperation(operationId, force, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -24994,26 +26614,10265 @@ function _cancelOperation(operationId, force, options, callback) { }); } -/** Class representing a ServiceFabricClient. */ -class ServiceFabricClient extends ServiceClient { - /** - * Create a ServiceFabricClient. - * @param {string} [baseUri] - The base URI of the service. - * @param {object} [options] - The parameter options - * @param {Array} [options.filters] - Filters to be added to the request pipeline - * @param {object} [options.requestOptions] - Options for the underlying request object - * {@link https://github.com/request/request#requestoptions-callback Options doc} - * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - */ - constructor(baseUri, options) { +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionQuorumLossProgress} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getQuorumLossProgress(serviceId, partitionId, operationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } - if (!options) options = {}; + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } - super(null, options); + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PartitionQuorumLossProgress']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'http://localhost:19080'; + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (restartPartitionMode === null || restartPartitionMode === undefined || typeof restartPartitionMode.valueOf() !== 'string') { + throw new Error('restartPartitionMode cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('RestartPartitionMode=' + encodeURIComponent(restartPartitionMode)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. + * + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. + * + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionRestartProgress} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionRestartProgress(serviceId, partitionId, operationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PartitionRestartProgress']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} nodeTransitionType 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' + * + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. + * + * @param {number} stopDurationInSeconds 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (nodeTransitionType === null || nodeTransitionType === undefined || typeof nodeTransitionType.valueOf() !== 'string') { + throw new Error('nodeTransitionType cannot be null or undefined and it must be of type string.'); + } + if (nodeInstanceId === null || nodeInstanceId === undefined || typeof nodeInstanceId.valueOf() !== 'string') { + throw new Error('nodeInstanceId cannot be null or undefined and it must be of type string.'); + } + if (stopDurationInSeconds === null || stopDurationInSeconds === undefined || typeof stopDurationInSeconds !== 'number') { + throw new Error('stopDurationInSeconds cannot be null or undefined and it must be of type number.'); + } + if (stopDurationInSeconds !== null && stopDurationInSeconds !== undefined) { + if (stopDurationInSeconds < 0) + { + throw new Error('"stopDurationInSeconds" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Nodes/{nodeName}/$/StartTransition/'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('NodeTransitionType=' + encodeURIComponent(nodeTransitionType)); + queryParameters.push('NodeInstanceId=' + encodeURIComponent(nodeInstanceId)); + queryParameters.push('StopDurationInSeconds=' + encodeURIComponent(stopDurationInSeconds.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the progress of an operation started using + * StartNodeTransition. + * + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. + * + * + * @param {string} nodeName The name of the node. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeTransitionProgress} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getNodeTransitionProgress(nodeName, operationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/Nodes/{nodeName}/$/GetTransitionProgress'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['NodeTransitionProgress']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a list of user-induced fault operations filtered by provided + * input. + * + * Gets the a list of user-induced fault operations filtered by provided input. + * + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. + * + * + * @param {number} stateFilter 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 + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getFaultOperationList(typeFilter, stateFilter, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (typeFilter === null || typeFilter === undefined || typeof typeFilter !== 'number') { + throw new Error('typeFilter cannot be null or undefined and it must be of type number.'); + } + if (stateFilter === null || stateFilter === undefined || typeof stateFilter !== 'number') { + throw new Error('stateFilter cannot be null or undefined and it must be of type number.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('TypeFilter=' + encodeURIComponent(typeFilter.toString())); + queryParameters.push('StateFilter=' + encodeURIComponent(stateFilter.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OperationStatusElementType', + type: { + name: 'Composite', + className: 'OperationStatus' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Cancels a user-induced fault operation. + * + * The following is a list of APIs that start fault operations that may be + * cancelled using CancelOperation - + * - StartDataLoss + * - StartQuorumLoss + * - StartPartitionRestart + * - StartNodeTransition + * + * 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/is be + * 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 {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {boolean} force Indicates whether to gracefully rollback and clean up + * internal system state modified by executing the user-induced operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _cancelOperation(operationId, force, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (operationId === null || operationId === undefined || typeof operationId.valueOf() !== 'string' || !msRest.isValidUuid(operationId)) { + throw new Error('operationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (force === null || force === undefined || typeof force !== 'boolean') { + throw new Error('force cannot be null or undefined and it must be of type boolean.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Faults/$/Cancel'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('OperationId=' + encodeURIComponent(operationId.toString())); + queryParameters.push('Force=' + encodeURIComponent(force.toString())); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createBackupPolicy(backupPolicyDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (backupPolicyDescription === null || backupPolicyDescription === undefined) { + throw new Error('backupPolicyDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies/$/Create'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (backupPolicyDescription !== null && backupPolicyDescription !== undefined) { + let requestModelMapper = new client.models['BackupPolicyDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, backupPolicyDescription, 'backupPolicyDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(backupPolicyDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteBackupPolicy(backupPolicyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { + throw new Error('backupPolicyName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete'; + requestUrl = requestUrl.replace('{backupPolicyName}', encodeURIComponent(backupPolicyName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all the backup policies configured. + * + * Get a list of all the backup policies configured. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupPolicyDescriptionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getBackupPolicyList(options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupPolicyDescriptionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a particular backup policy by name. + * + * Gets a particular backup policy identified by {backupPolicyName} + * + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link BackupPolicyDescription} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getBackupPolicyByName(backupPolicyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { + throw new Error('backupPolicyName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies/{backupPolicyName}'; + requestUrl = requestUrl.replace('{backupPolicyName}', encodeURIComponent(backupPolicyName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['BackupPolicyDescription']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupEntityList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getAllEntitiesBackedUpByPolicy(backupPolicyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { + throw new Error('backupPolicyName cannot be null or undefined and it must be of type string.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'; + requestUrl = requestUrl.replace('{backupPolicyName}', encodeURIComponent(backupPolicyName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupEntityList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Updates the backup policy. + * + * Updates the backup policy identified by {backupPolicyName} + * + * + * @param {object} backupPolicyDescription Describes the backup policy. + * + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. + * + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. + * + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. + * + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator + * + * @param {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (backupPolicyDescription === null || backupPolicyDescription === undefined) { + throw new Error('backupPolicyDescription cannot be null or undefined.'); + } + if (backupPolicyName === null || backupPolicyName === undefined || typeof backupPolicyName.valueOf() !== 'string') { + throw new Error('backupPolicyName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/BackupPolicies/{backupPolicyName}/$/Update'; + requestUrl = requestUrl.replace('{backupPolicyName}', encodeURIComponent(backupPolicyName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (backupPolicyDescription !== null && backupPolicyDescription !== undefined) { + let requestModelMapper = new client.models['BackupPolicyDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, backupPolicyDescription, 'backupPolicyDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(backupPolicyDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _enableApplicationBackup(applicationId, enableBackupDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (enableBackupDescription === null || enableBackupDescription === undefined) { + throw new Error('enableBackupDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/EnableBackup'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (enableBackupDescription !== null && enableBackupDescription !== undefined) { + let requestModelMapper = new client.models['EnableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, enableBackupDescription, 'enableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(enableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Disables periodic backup of Service Fabric application. + * + * Disables periodic backup of Service Fabric application which was previously + * enabled. + * + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _disableApplicationBackup(applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/DisableBackup'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getApplicationBackupConfigurationInfo(applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/GetBackupConfigurationInfo'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupConfigurationInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getApplicationBackupList(applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let latest = (options && options.latest !== undefined) ? options.latest : false; + let startDateTimeFilter = (options && options.startDateTimeFilter !== undefined) ? options.startDateTimeFilter : undefined; + let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (latest !== null && latest !== undefined && typeof latest !== 'boolean') { + throw new Error('latest must be of type boolean.'); + } + if (startDateTimeFilter && !(startDateTimeFilter instanceof Date || + (typeof startDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(startDateTimeFilter))))) { + throw new Error('startDateTimeFilter must be of type date.'); + } + if (endDateTimeFilter && !(endDateTimeFilter instanceof Date || + (typeof endDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(endDateTimeFilter))))) { + throw new Error('endDateTimeFilter must be of type date.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/GetBackups'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (latest !== null && latest !== undefined) { + queryParameters.push('Latest=' + encodeURIComponent(latest.toString())); + } + if (startDateTimeFilter !== null && startDateTimeFilter !== undefined) { + queryParameters.push('StartDateTimeFilter=' + encodeURIComponent(client.serializeObject(startDateTimeFilter))); + } + if (endDateTimeFilter !== null && endDateTimeFilter !== undefined) { + queryParameters.push('EndDateTimeFilter=' + encodeURIComponent(client.serializeObject(endDateTimeFilter))); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _suspendApplicationBackup(applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/SuspendBackup'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _resumeApplicationBackup(applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Applications/{applicationId}/$/ResumeBackup'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _enableServiceBackup(serviceId, enableBackupDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (enableBackupDescription === null || enableBackupDescription === undefined) { + throw new Error('enableBackupDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/EnableBackup'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (enableBackupDescription !== null && enableBackupDescription !== undefined) { + let requestModelMapper = new client.models['EnableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, enableBackupDescription, 'enableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(enableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _disableServiceBackup(serviceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/DisableBackup'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getServiceBackupConfigurationInfo(serviceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/GetBackupConfigurationInfo'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupConfigurationInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getServiceBackupList(serviceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let latest = (options && options.latest !== undefined) ? options.latest : false; + let startDateTimeFilter = (options && options.startDateTimeFilter !== undefined) ? options.startDateTimeFilter : undefined; + let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (latest !== null && latest !== undefined && typeof latest !== 'boolean') { + throw new Error('latest must be of type boolean.'); + } + if (startDateTimeFilter && !(startDateTimeFilter instanceof Date || + (typeof startDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(startDateTimeFilter))))) { + throw new Error('startDateTimeFilter must be of type date.'); + } + if (endDateTimeFilter && !(endDateTimeFilter instanceof Date || + (typeof endDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(endDateTimeFilter))))) { + throw new Error('endDateTimeFilter must be of type date.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/GetBackups'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (latest !== null && latest !== undefined) { + queryParameters.push('Latest=' + encodeURIComponent(latest.toString())); + } + if (startDateTimeFilter !== null && startDateTimeFilter !== undefined) { + queryParameters.push('StartDateTimeFilter=' + encodeURIComponent(client.serializeObject(startDateTimeFilter))); + } + if (endDateTimeFilter !== null && endDateTimeFilter !== undefined) { + queryParameters.push('EndDateTimeFilter=' + encodeURIComponent(client.serializeObject(endDateTimeFilter))); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _suspendServiceBackup(serviceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/SuspendBackup'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _resumeServiceBackup(serviceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Services/{serviceId}/$/ResumeBackup'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _enablePartitionBackup(partitionId, enableBackupDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (enableBackupDescription === null || enableBackupDescription === undefined) { + throw new Error('enableBackupDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/EnableBackup'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (enableBackupDescription !== null && enableBackupDescription !== undefined) { + let requestModelMapper = new client.models['EnableBackupDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, enableBackupDescription, 'enableBackupDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(enableBackupDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _disablePartitionBackup(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/DisableBackup'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the partition backup configuration information + * + * Gets the Service Fabric Backup configuration information for the specified + * partition. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionBackupConfigurationInfo} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionBackupConfigurationInfo(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/GetBackupConfigurationInfo'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PartitionBackupConfigurationInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionBackupList(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let latest = (options && options.latest !== undefined) ? options.latest : false; + let startDateTimeFilter = (options && options.startDateTimeFilter !== undefined) ? options.startDateTimeFilter : undefined; + let endDateTimeFilter = (options && options.endDateTimeFilter !== undefined) ? options.endDateTimeFilter : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (latest !== null && latest !== undefined && typeof latest !== 'boolean') { + throw new Error('latest must be of type boolean.'); + } + if (startDateTimeFilter && !(startDateTimeFilter instanceof Date || + (typeof startDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(startDateTimeFilter))))) { + throw new Error('startDateTimeFilter must be of type date.'); + } + if (endDateTimeFilter && !(endDateTimeFilter instanceof Date || + (typeof endDateTimeFilter.valueOf() === 'string' && !isNaN(Date.parse(endDateTimeFilter))))) { + throw new Error('endDateTimeFilter must be of type date.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/GetBackups'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (latest !== null && latest !== undefined) { + queryParameters.push('Latest=' + encodeURIComponent(latest.toString())); + } + if (startDateTimeFilter !== null && startDateTimeFilter !== undefined) { + queryParameters.push('StartDateTimeFilter=' + encodeURIComponent(client.serializeObject(startDateTimeFilter))); + } + if (endDateTimeFilter !== null && endDateTimeFilter !== undefined) { + queryParameters.push('EndDateTimeFilter=' + encodeURIComponent(client.serializeObject(endDateTimeFilter))); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _suspendPartitionBackup(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/SuspendBackup'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _resumePartitionBackup(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/ResumeBackup'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.backupPartitionDescription] 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. + * + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _backupPartition(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let backupPartitionDescription = (options && options.backupPartitionDescription !== undefined) ? options.backupPartitionDescription : undefined; + let backupTimeout = (options && options.backupTimeout !== undefined) ? options.backupTimeout : 10; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (backupTimeout !== null && backupTimeout !== undefined && typeof backupTimeout !== 'number') { + throw new Error('backupTimeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/Backup'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + if (backupTimeout !== null && backupTimeout !== undefined) { + queryParameters.push('BackupTimeout=' + encodeURIComponent(backupTimeout.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (backupPartitionDescription !== null && backupPartitionDescription !== undefined) { + let requestModelMapper = new client.models['BackupPartitionDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, backupPartitionDescription, 'backupPartitionDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(backupPartitionDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link BackupProgressInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionBackupProgress(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/GetBackupProgress'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['BackupProgressInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.restoreTimeout] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _restorePartition(partitionId, restorePartitionDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let restoreTimeout = (options && options.restoreTimeout !== undefined) ? options.restoreTimeout : 10; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (restorePartitionDescription === null || restorePartitionDescription === undefined) { + throw new Error('restorePartitionDescription cannot be null or undefined.'); + } + if (restoreTimeout !== null && restoreTimeout !== undefined && typeof restoreTimeout !== 'number') { + throw new Error('restoreTimeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/Restore'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + if (restoreTimeout !== null && restoreTimeout !== undefined) { + queryParameters.push('RestoreTimeout=' + encodeURIComponent(restoreTimeout.toString())); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (restorePartitionDescription !== null && restorePartitionDescription !== undefined) { + let requestModelMapper = new client.models['RestorePartitionDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, restorePartitionDescription, 'restorePartitionDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(restorePartitionDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RestoreProgressInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionRestoreProgress(partitionId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Partitions/{partitionId}/$/GetRestoreProgress'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['RestoreProgressInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. + * + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. + * + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. + * + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. + * + * @param {object} getBackupByStorageQueryDescription.storage 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. + * + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator + * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. + * + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let maxResults = (options && options.maxResults !== undefined) ? options.maxResults : 0; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') { + throw new Error('maxResults must be of type number.'); + } + if (maxResults !== null && maxResults !== undefined) { + if (maxResults < 0) + { + throw new Error('"maxResults" should satisfy the constraint - "InclusiveMinimum": 0'); + } + } + if (getBackupByStorageQueryDescription === null || getBackupByStorageQueryDescription === undefined) { + throw new Error('getBackupByStorageQueryDescription cannot be null or undefined.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'BackupRestore/$/GetBackups'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (maxResults !== null && maxResults !== undefined) { + queryParameters.push('MaxResults=' + encodeURIComponent(maxResults.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (getBackupByStorageQueryDescription !== null && getBackupByStorageQueryDescription !== undefined) { + let requestModelMapper = new client.models['GetBackupByStorageQueryDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, getBackupByStorageQueryDescription, 'getBackupByStorageQueryDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(getBackupByStorageQueryDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedBackupInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Creates a Service Fabric name. + * + * Creates the specified Service Fabric name. + * + * @param {object} nameDescription Describes the Service Fabric name to be + * created. + * + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createName(nameDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameDescription === null || nameDescription === undefined) { + throw new Error('nameDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/$/Create'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (nameDescription !== null && nameDescription !== undefined) { + let requestModelMapper = new client.models['NameDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, nameDescription, 'nameDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(nameDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Returns whether the Service Fabric name exists. + * + * Returns whether the specified Service Fabric name exists. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getNameExistsInfo(nameId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteName(nameId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSubNameInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSubNameInfoList(nameId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let recursive = (options && options.recursive !== undefined) ? options.recursive : false; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (recursive !== null && recursive !== undefined && typeof recursive !== 'boolean') { + throw new Error('recursive must be of type boolean.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetSubNames'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (recursive !== null && recursive !== undefined) { + queryParameters.push('Recursive=' + encodeURIComponent(recursive.toString())); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedSubNameInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets information on all Service Fabric properties under a given + * name. + * + * A Service Fabric name can have one or more named properties that stores + * custom information. This operation gets the information about these + * properties in a paged list. The information include name, value and metadata + * about each of the properties. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.includeValues] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedPropertyInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPropertyInfoList(nameId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let includeValues = (options && options.includeValues !== undefined) ? options.includeValues : false; + let continuationToken = (options && options.continuationToken !== undefined) ? options.continuationToken : undefined; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (includeValues !== null && includeValues !== undefined && typeof includeValues !== 'boolean') { + throw new Error('includeValues must be of type boolean.'); + } + if (continuationToken !== null && continuationToken !== undefined && typeof continuationToken.valueOf() !== 'string') { + throw new Error('continuationToken must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetProperties'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (includeValues !== null && includeValues !== undefined) { + queryParameters.push('IncludeValues=' + encodeURIComponent(includeValues.toString())); + } + if (continuationToken !== null && continuationToken !== undefined) { + queryParameters.push('ContinuationToken=' + continuationToken); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PagedPropertyInfoList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Creates or updates a Service Fabric property. + * + * Creates or updates the specified Service Fabric property under a given name. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type id. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _putProperty(nameId, propertyDescription, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (propertyDescription === null || propertyDescription === undefined) { + throw new Error('propertyDescription cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetProperty'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (propertyDescription !== null && propertyDescription !== undefined) { + let requestModelMapper = new client.models['PropertyDescription']().mapper(); + requestModel = client.serialize(requestModelMapper, propertyDescription, 'propertyDescription'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(propertyDescription, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPropertyInfo(nameId, propertyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (propertyName === null || propertyName === undefined || typeof propertyName.valueOf() !== 'string') { + throw new Error('propertyName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetProperty'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('PropertyName=' + encodeURIComponent(propertyName)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PropertyInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteProperty(nameId, propertyName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (propertyName === null || propertyName === undefined || typeof propertyName.valueOf() !== 'string') { + throw new Error('propertyName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetProperty'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + queryParameters.push('PropertyName=' + encodeURIComponent(propertyName)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Submits a property batch. + * + * Submits a batch of property operations. Either all or none of the operations + * will be committed. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. + * + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PropertyBatchInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _submitPropertyBatch(nameId, propertyBatchDescriptionList, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nameId === null || nameId === undefined || typeof nameId.valueOf() !== 'string') { + throw new Error('nameId cannot be null or undefined and it must be of type string.'); + } + if (propertyBatchDescriptionList === null || propertyBatchDescriptionList === undefined) { + throw new Error('propertyBatchDescriptionList cannot be null or undefined.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Names/{nameId}/$/GetProperties/$/SubmitBatch'; + requestUrl = requestUrl.replace('{nameId}', nameId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (propertyBatchDescriptionList !== null && propertyBatchDescriptionList !== undefined) { + let requestModelMapper = new client.models['PropertyBatchDescriptionList']().mapper(); + requestModel = client.serialize(requestModelMapper, propertyBatchDescriptionList, 'propertyBatchDescriptionList'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(propertyBatchDescriptionList, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 409) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SuccessfulPropertyBatchInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 409) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['FailedPropertyBatchInfo']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Cluster-related events. + * + * The response is list of ClusterEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Cluster/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ClusterEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ClusterEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Containers-related events. + * + * The response is list of ContainerInstanceEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Containers/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ContainerInstanceEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ContainerInstanceEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a Node-related events. + * + * The response is list of NodeEvent objects. + * + * @param {string} nodeName The name of the node. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/{nodeName}/$/Events'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NodeEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Nodes-related Events. + * + * The response is list of NodeEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Nodes/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NodeEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'NodeEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets an Application-related events. + * + * The response is list of ApplicationEvent objects. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/{applicationId}/$/Events'; + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Applications-related events. + * + * The response is list of ApplicationEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Applications/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ApplicationEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ApplicationEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a Service-related events. + * + * The response is list of ServiceEvent objects. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (serviceId === null || serviceId === undefined || typeof serviceId.valueOf() !== 'string') { + throw new Error('serviceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/{serviceId}/$/Events'; + requestUrl = requestUrl.replace('{serviceId}', serviceId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Services-related events. + * + * The response is list of ServiceEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Services/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ServiceEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a Partition-related events. + * + * The response is list of PartitionEvent objects. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Events'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PartitionEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Partitions-related events. + * + * The response is list of PartitionEvent objects. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/Events'; + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PartitionEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'PartitionEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a Partition Replica-related events. + * + * The response is list of ReplicaEvent objects. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (replicaId === null || replicaId === undefined || typeof replicaId.valueOf() !== 'string') { + throw new Error('replicaId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + requestUrl = requestUrl.replace('{replicaId}', replicaId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReplicaEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ReplicaEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all Replicas-related events for a Partition. + * + * The response is list of ReplicaEvent objects. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let eventsTypesFilter = (options && options.eventsTypesFilter !== undefined) ? options.eventsTypesFilter : undefined; + let excludeAnalysisEvents = (options && options.excludeAnalysisEvents !== undefined) ? options.excludeAnalysisEvents : undefined; + let skipCorrelationLookup = (options && options.skipCorrelationLookup !== undefined) ? options.skipCorrelationLookup : undefined; + let apiVersion = '6.2-preview'; + // Validate + try { + if (partitionId === null || partitionId === undefined || typeof partitionId.valueOf() !== 'string' || !msRest.isValidUuid(partitionId)) { + throw new Error('partitionId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + if (startTimeUtc === null || startTimeUtc === undefined || typeof startTimeUtc.valueOf() !== 'string') { + throw new Error('startTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (endTimeUtc === null || endTimeUtc === undefined || typeof endTimeUtc.valueOf() !== 'string') { + throw new Error('endTimeUtc cannot be null or undefined and it must be of type string.'); + } + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined && typeof eventsTypesFilter.valueOf() !== 'string') { + throw new Error('eventsTypesFilter must be of type string.'); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined && typeof excludeAnalysisEvents !== 'boolean') { + throw new Error('excludeAnalysisEvents must be of type boolean.'); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined && typeof skipCorrelationLookup !== 'boolean') { + throw new Error('skipCorrelationLookup must be of type boolean.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/Partitions/{partitionId}/$/Replicas/Events'; + requestUrl = requestUrl.replace('{partitionId}', partitionId.toString()); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + queryParameters.push('StartTimeUtc=' + encodeURIComponent(startTimeUtc)); + queryParameters.push('EndTimeUtc=' + encodeURIComponent(endTimeUtc)); + if (eventsTypesFilter !== null && eventsTypesFilter !== undefined) { + queryParameters.push('EventsTypesFilter=' + encodeURIComponent(eventsTypesFilter)); + } + if (excludeAnalysisEvents !== null && excludeAnalysisEvents !== undefined) { + queryParameters.push('ExcludeAnalysisEvents=' + encodeURIComponent(excludeAnalysisEvents.toString())); + } + if (skipCorrelationLookup !== null && skipCorrelationLookup !== undefined) { + queryParameters.push('SkipCorrelationLookup=' + encodeURIComponent(skipCorrelationLookup.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReplicaEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'ReplicaEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets all correlated events for a given event. + * + * The response is list of FabricEvents. + * + * @param {string} eventInstanceId The EventInstanceId. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getCorrelatedEventList(eventInstanceId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.2-preview'; + // Validate + try { + if (eventInstanceId === null || eventInstanceId === undefined || typeof eventInstanceId.valueOf() !== 'string') { + throw new Error('eventInstanceId cannot be null or undefined and it must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events'; + requestUrl = requestUrl.replace('{eventInstanceId}', encodeURIComponent(eventInstanceId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'FabricEventElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'Kind', + clientName: 'kind' + }, + uberParent: 'FabricEvent', + className: 'FabricEvent' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ServiceFabricClient. */ +class ServiceFabricClient extends ServiceClient { + /** + * Create a ServiceFabricClient. + * @param {string} [baseUri] - The base URI of the service. + * @param {object} [options] - The parameter options + * @param {Array} [options.filters] - Filters to be added to the request pipeline + * @param {object} [options.requestOptions] - Options for the underlying request object + * {@link https://github.com/request/request#requestoptions-callback Options doc} + * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + */ + constructor(baseUri, options) { + + if (!options) options = {}; + + super(null, options); + + this.baseUri = baseUri; + if (!this.baseUri) { + this.baseUri = 'http://localhost:19080'; } let packageInfo = this.getPackageJsonInfo(__dirname); @@ -25030,6 +36889,8 @@ class ServiceFabricClient extends ServiceClient { this._getClusterUpgradeProgress = _getClusterUpgradeProgress; this._getClusterConfiguration = _getClusterConfiguration; this._getClusterConfigurationUpgradeStatus = _getClusterConfigurationUpgradeStatus; + this._getUpgradeOrchestrationServiceState = _getUpgradeOrchestrationServiceState; + this._setUpgradeOrchestrationServiceState = _setUpgradeOrchestrationServiceState; this._provisionCluster = _provisionCluster; this._unprovisionCluster = _unprovisionCluster; this._rollbackClusterUpgrade = _rollbackClusterUpgrade; @@ -25053,6 +36914,7 @@ class ServiceFabricClient extends ServiceClient { this._provisionApplicationType = _provisionApplicationType; this._unprovisionApplicationType = _unprovisionApplicationType; this._getServiceTypeInfoList = _getServiceTypeInfoList; + this._getServiceTypeInfoByName = _getServiceTypeInfoByName; this._getServiceManifest = _getServiceManifest; this._getDeployedServiceTypeInfoList = _getDeployedServiceTypeInfoList; this._getDeployedServiceTypeInfoByName = _getDeployedServiceTypeInfoByName; @@ -25121,23 +36983,33 @@ class ServiceFabricClient extends ServiceClient { this._getDeployedServicePackageHealth = _getDeployedServicePackageHealth; this._getDeployedServicePackageHealthUsingPolicy = _getDeployedServicePackageHealthUsingPolicy; this._reportDeployedServicePackageHealth = _reportDeployedServicePackageHealth; - this._deployedServicePackageToNode = _deployedServicePackageToNode; + this._deployServicePackageToNode = _deployServicePackageToNode; this._getDeployedCodePackageInfoList = _getDeployedCodePackageInfoList; this._restartDeployedCodePackage = _restartDeployedCodePackage; + this._getContainerLogsDeployedOnNode = _getContainerLogsDeployedOnNode; + this._invokeContainerApi = _invokeContainerApi; this._createComposeDeployment = _createComposeDeployment; this._getComposeDeploymentStatus = _getComposeDeploymentStatus; this._getComposeDeploymentStatusList = _getComposeDeploymentStatusList; this._getComposeDeploymentUpgradeProgress = _getComposeDeploymentUpgradeProgress; this._removeComposeDeployment = _removeComposeDeployment; this._startComposeDeploymentUpgrade = _startComposeDeploymentUpgrade; + this._getChaos = _getChaos; this._startChaos = _startChaos; this._stopChaos = _stopChaos; - this._getChaosReport = _getChaosReport; + this._getChaosEvents = _getChaosEvents; + this._getChaosSchedule = _getChaosSchedule; + this._postChaosSchedule = _postChaosSchedule; this._uploadFile = _uploadFile; this._getImageStoreContent = _getImageStoreContent; this._deleteImageStoreContent = _deleteImageStoreContent; this._getImageStoreRootContent = _getImageStoreRootContent; this._copyImageStoreContent = _copyImageStoreContent; + this._deleteImageStoreUploadSession = _deleteImageStoreUploadSession; + this._commitImageStoreUploadSession = _commitImageStoreUploadSession; + this._getImageStoreUploadSessionById = _getImageStoreUploadSessionById; + this._getImageStoreUploadSessionByPath = _getImageStoreUploadSessionByPath; + this._uploadFileChunk = _uploadFileChunk; this._invokeInfrastructureCommand = _invokeInfrastructureCommand; this._invokeInfrastructureQuery = _invokeInfrastructureQuery; this._startDataLoss = _startDataLoss; @@ -25150,48 +37022,10102 @@ class ServiceFabricClient extends ServiceClient { this._getNodeTransitionProgress = _getNodeTransitionProgress; this._getFaultOperationList = _getFaultOperationList; this._cancelOperation = _cancelOperation; + this._createBackupPolicy = _createBackupPolicy; + this._deleteBackupPolicy = _deleteBackupPolicy; + this._getBackupPolicyList = _getBackupPolicyList; + this._getBackupPolicyByName = _getBackupPolicyByName; + this._getAllEntitiesBackedUpByPolicy = _getAllEntitiesBackedUpByPolicy; + this._updateBackupPolicy = _updateBackupPolicy; + this._enableApplicationBackup = _enableApplicationBackup; + this._disableApplicationBackup = _disableApplicationBackup; + this._getApplicationBackupConfigurationInfo = _getApplicationBackupConfigurationInfo; + this._getApplicationBackupList = _getApplicationBackupList; + this._suspendApplicationBackup = _suspendApplicationBackup; + this._resumeApplicationBackup = _resumeApplicationBackup; + this._enableServiceBackup = _enableServiceBackup; + this._disableServiceBackup = _disableServiceBackup; + this._getServiceBackupConfigurationInfo = _getServiceBackupConfigurationInfo; + this._getServiceBackupList = _getServiceBackupList; + this._suspendServiceBackup = _suspendServiceBackup; + this._resumeServiceBackup = _resumeServiceBackup; + this._enablePartitionBackup = _enablePartitionBackup; + this._disablePartitionBackup = _disablePartitionBackup; + this._getPartitionBackupConfigurationInfo = _getPartitionBackupConfigurationInfo; + this._getPartitionBackupList = _getPartitionBackupList; + this._suspendPartitionBackup = _suspendPartitionBackup; + this._resumePartitionBackup = _resumePartitionBackup; + this._backupPartition = _backupPartition; + this._getPartitionBackupProgress = _getPartitionBackupProgress; + this._restorePartition = _restorePartition; + this._getPartitionRestoreProgress = _getPartitionRestoreProgress; + this._getBackupsFromBackupLocation = _getBackupsFromBackupLocation; + this._createName = _createName; + this._getNameExistsInfo = _getNameExistsInfo; + this._deleteName = _deleteName; + this._getSubNameInfoList = _getSubNameInfoList; + this._getPropertyInfoList = _getPropertyInfoList; + this._putProperty = _putProperty; + this._getPropertyInfo = _getPropertyInfo; + this._deleteProperty = _deleteProperty; + this._submitPropertyBatch = _submitPropertyBatch; + this._getClusterEventList = _getClusterEventList; + this._getContainersEventList = _getContainersEventList; + this._getNodeEventList = _getNodeEventList; + this._getNodesEventList = _getNodesEventList; + this._getApplicationEventList = _getApplicationEventList; + this._getApplicationsEventList = _getApplicationsEventList; + this._getServiceEventList = _getServiceEventList; + this._getServicesEventList = _getServicesEventList; + this._getPartitionEventList = _getPartitionEventList; + this._getPartitionsEventList = _getPartitionsEventList; + this._getPartitionReplicaEventList = _getPartitionReplicaEventList; + this._getPartitionReplicasEventList = _getPartitionReplicasEventList; + this._getCorrelatedEventList = _getCorrelatedEventList; msRest.addSerializationMixin(this); } /** - * @summary Get the Service Fabric cluster manifest. + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterManifestWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterManifest(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterManifest} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterManifest} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterManifest(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterManifest(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterManifest(options, optionalCallback); + } + } + + /** + * @summary Gets the health of a Service Fabric cluster. + * + * Gets the health of a Service Fabric cluster. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.nodesHealthStateFilter] 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. + * + * + * @param {number} [options.applicationsHealthStateFilter] 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. + * + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterHealthWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterHealth(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the health of a Service Fabric cluster. + * + * Gets the health of a Service Fabric cluster. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to + * filter the collection of nodes and applications returned based on their + * aggregated health state. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.nodesHealthStateFilter] 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. + * + * + * @param {number} [options.applicationsHealthStateFilter] 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. + * + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterHealth(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterHealth(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterHealth(options, optionalCallback); + } + } + + /** + * @summary Gets the health of a Service Fabric cluster using the specified + * policy. + * + * Gets the health of a Service Fabric cluster. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter 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 {object} [options] Optional Parameters. + * + * @param {number} [options.nodesHealthStateFilter] 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. + * + * + * @param {number} [options.applicationsHealthStateFilter] 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. + * + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies] 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. + * + * + * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterHealthUsingPolicyWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the health of a Service Fabric cluster using the specified + * policy. + * + * Gets the health of a Service Fabric cluster. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the cluster based on the health state. + * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter 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 {object} [options] Optional Parameters. + * + * @param {number} [options.nodesHealthStateFilter] 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. + * + * + * @param {number} [options.applicationsHealthStateFilter] 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. + * + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {boolean} [options.includeSystemApplicationHealthStatistics] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies] 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. + * + * + * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * 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. + * + * + * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterHealthUsingPolicy(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterHealthUsingPolicy(options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterHealthChunkWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterHealthChunk(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterHealthChunk} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealthChunk} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterHealthChunk(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterHealthChunk(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterHealthChunk(options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {object} [options.clusterHealthChunkQueryDescription] 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. + * + * + * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] + * 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. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationFilters] 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. + * + * + * @param {object} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {object} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterHealthChunkUsingPolicyAndAdvancedFiltersWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {object} [options.clusterHealthChunkQueryDescription] 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. + * + * + * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] + * 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. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationFilters] 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. + * + * + * @param {object} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a + * health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {object} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterHealthChunk} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterHealthChunk} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback); + } + } + + /** + * @summary 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 {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + reportClusterHealthWithHttpOperationResponse(healthInformation, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + reportClusterHealth(healthInformation, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._reportClusterHealth(healthInformation, options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {string} [options.codeVersion] The product version of Service Fabric. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getProvisionedFabricCodeVersionInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {string} [options.codeVersion] The product version of Service Fabric. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getProvisionedFabricCodeVersionInfoList(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getProvisionedFabricCodeVersionInfoList(options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {string} [options.configVersion] The config version of Service + * Fabric. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getProvisionedFabricConfigVersionInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {string} [options.configVersion] The config version of Service + * Fabric. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getProvisionedFabricConfigVersionInfoList(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getProvisionedFabricConfigVersionInfoList(options, optionalCallback); + } + } + + /** + * @summary Gets the progress of the current cluster upgrade. + * + * Gets the current progress of the ongoing cluster upgrade. If no upgrade is + * currently in progress, gets the last state of the previous cluster upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterUpgradeProgressWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterUpgradeProgress(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the progress of the current cluster upgrade. + * + * Gets the current progress of the ongoing cluster upgrade. If no upgrade is + * currently in progress, gets the last state of the previous cluster upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterUpgradeProgressObject} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterUpgradeProgressObject} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterUpgradeProgress(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterUpgradeProgress(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterUpgradeProgress(options, optionalCallback); + } + } + + /** + * @summary Get the Service Fabric standalone cluster configuration. + * + * Get the Service Fabric standalone cluster configuration. The cluster + * configuration contains properties of the cluster that include different node + * types on the cluster, + * security configurations, fault and upgrade domain topologies, etc. + * + * + * @param {string} configurationApiVersion The API version of the Standalone + * cluster json configuration. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterConfigurationWithHttpOperationResponse(configurationApiVersion, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get the Service Fabric standalone cluster configuration. + * + * Get the Service Fabric standalone cluster configuration. The cluster + * configuration contains properties of the cluster that include different node + * types on the cluster, + * security configurations, fault and upgrade domain topologies, etc. + * + * + * @param {string} configurationApiVersion The API version of the Standalone + * cluster json configuration. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterConfiguration} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterConfiguration} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterConfiguration(configurationApiVersion, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterConfiguration(configurationApiVersion, options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getClusterConfigurationUpgradeStatusWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ClusterConfigurationUpgradeStatusInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ClusterConfigurationUpgradeStatusInfo} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getClusterConfigurationUpgradeStatus(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getClusterConfigurationUpgradeStatus(options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getUpgradeOrchestrationServiceStateWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {UpgradeOrchestrationServiceState} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceState} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getUpgradeOrchestrationServiceState(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getUpgradeOrchestrationServiceState(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getUpgradeOrchestrationServiceState(options, optionalCallback); + } + } + + /** + * @summary 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 {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. + * + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + setUpgradeOrchestrationServiceStateWithHttpOperationResponse(upgradeOrchestrationServiceState, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} upgradeOrchestrationServiceState Service state of Service + * Fabric Upgrade Orchestration Service. + * + * @param {string} [upgradeOrchestrationServiceState.serviceState] The state of + * Service Fabric Upgrade Orchestration Service. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {UpgradeOrchestrationServiceStateSummary} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UpgradeOrchestrationServiceStateSummary} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._setUpgradeOrchestrationServiceState(upgradeOrchestrationServiceState, options, optionalCallback); + } + } + + /** + * @summary 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 {object} provisionFabricDescription Describes the parameters for + * provisioning a cluster. + * + * @param {string} [provisionFabricDescription.codeFilePath] The cluster code + * package file path. + * + * @param {string} [provisionFabricDescription.clusterManifestFilePath] The + * cluster manifest file path. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + provisionClusterWithHttpOperationResponse(provisionFabricDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} provisionFabricDescription Describes the parameters for + * provisioning a cluster. + * + * @param {string} [provisionFabricDescription.codeFilePath] The cluster code + * package file path. + * + * @param {string} [provisionFabricDescription.clusterManifestFilePath] The + * cluster manifest file path. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + provisionCluster(provisionFabricDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._provisionCluster(provisionFabricDescription, options, optionalCallback); + } + } + + /** + * @summary Unprovision the code or configuration packages of a Service Fabric + * cluster. + * + * Unprovision the code or configuration packages of a Service Fabric cluster. + * It is supported to unprovision code and configuration separately. + * + * @param {object} unprovisionFabricDescription Describes the parameters for + * unprovisioning a cluster. + * + * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code + * package version. + * + * @param {string} [unprovisionFabricDescription.configVersion] The cluster + * manifest version. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + unprovisionClusterWithHttpOperationResponse(unprovisionFabricDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Unprovision the code or configuration packages of a Service Fabric + * cluster. + * + * Unprovision the code or configuration packages of a Service Fabric cluster. + * It is supported to unprovision code and configuration separately. + * + * @param {object} unprovisionFabricDescription Describes the parameters for + * unprovisioning a cluster. + * + * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code + * package version. + * + * @param {string} [unprovisionFabricDescription.configVersion] The cluster + * manifest version. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + unprovisionCluster(unprovisionFabricDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._unprovisionCluster(unprovisionFabricDescription, options, optionalCallback); + } + } + + /** + * @summary Rollback the upgrade of a Service Fabric cluster. + * + * Rollback the code or configuration upgrade of a Service Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + rollbackClusterUpgradeWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._rollbackClusterUpgrade(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Rollback the upgrade of a Service Fabric cluster. + * + * Rollback the code or configuration upgrade of a Service Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + rollbackClusterUpgrade(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._rollbackClusterUpgrade(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._rollbackClusterUpgrade(options, optionalCallback); + } + } + + /** + * @summary 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 {object} resumeClusterUpgradeDescription Describes the parameters for + * resuming a cluster upgrade. + * + * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next + * upgrade domain for this cluster upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + resumeClusterUpgradeWithHttpOperationResponse(resumeClusterUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} resumeClusterUpgradeDescription Describes the parameters for + * resuming a cluster upgrade. + * + * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next + * upgrade domain for this cluster upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 {object} startClusterUpgradeDescription Describes the parameters for + * starting a cluster upgrade. + * + * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster + * code version. + * + * @param {string} [startClusterUpgradeDescription.configVersion] The cluster + * configuration version. + * + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {boolean} + * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * 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%. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * 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%. + * + * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + startClusterUpgradeWithHttpOperationResponse(startClusterUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} startClusterUpgradeDescription Describes the parameters for + * starting a cluster upgrade. + * + * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster + * code version. + * + * @param {string} [startClusterUpgradeDescription.configVersion] The cluster + * configuration version. + * + * @param {string} [startClusterUpgradeDescription.upgradeKind] The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * + * @param {boolean} [startClusterUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [startClusterUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] Defines + * a health policy used to evaluate the health of the cluster or of a cluster + * node. + * + * + * @param {boolean} + * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {boolean} + * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * 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%. + * + * @param {number} + * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * 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%. + * + * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 {object} clusterConfigurationUpgradeDescription Parameters for a + * standalone cluster configuration upgrade. + * + * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The + * cluster configuration. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length + * of time between attempts to perform a health checks if the application or + * cluster is not healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] + * The length of time to wait after completing an upgrade domain before + * starting the health checks process. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] + * The length of time that the application or cluster must remain healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The + * timeout for the upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade + * timeout. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed + * values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The + * maximum allowed percentage of delta health degradation during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain delta health degradation + * during the upgrade. Allowed values are integer values from zero to 100. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + startClusterConfigurationUpgradeWithHttpOperationResponse(clusterConfigurationUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} clusterConfigurationUpgradeDescription Parameters for a + * standalone cluster configuration upgrade. + * + * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The + * cluster configuration. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length + * of time between attempts to perform a health checks if the application or + * cluster is not healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] + * The length of time to wait after completing an upgrade domain before + * starting the health checks process. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] + * The length of time that the application or cluster must remain healthy. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The + * timeout for the upgrade domain. + * + * @param {moment.duration} + * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade + * timeout. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The + * maximum allowed percentage of unhealthy applications during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The + * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed + * values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The + * maximum allowed percentage of delta health degradation during the upgrade. + * Allowed values are integer values from zero to 100. + * + * @param {number} + * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * The maximum allowed percentage of upgrade domain delta health degradation + * during the upgrade. Allowed values are integer values from zero to 100. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. + * + * Update the upgrade parameters used during a Service Fabric cluster upgrade. + * + * @param {object} updateClusterUpgradeDescription Parameters for updating a + * cluster upgrade. + * + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * + * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {number} + * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.failureAction] 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' + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * + * + * @param {boolean} + * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {boolean} + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * 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%. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * 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%. + * + * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateClusterUpgradeWithHttpOperationResponse(updateClusterUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. + * + * Update the upgrade parameters used during a Service Fabric cluster upgrade. + * + * @param {object} updateClusterUpgradeDescription Parameters for updating a + * cluster upgrade. + * + * @param {string} [updateClusterUpgradeDescription.upgradeKind] The type of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * + * @param {object} [updateClusterUpgradeDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [updateClusterUpgradeDescription.updateDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {number} + * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.failureAction] 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' + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster or of a + * cluster node. + * + * + * @param {boolean} + * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] + * 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. + * + * + * @param {number} + * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] + * 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. + * + * + * @param {array} + * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {boolean} + * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, + * enables delta health evaluation rather than absolute health evaluation after + * completion of each upgrade domain. + * + * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * Defines a health policy used to evaluate the health of the cluster during a + * cluster upgrade. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] + * 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%. + * + * @param {number} + * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] + * 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%. + * + * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] + * Defines the application health policy map used to evaluate the health of an + * application or one of its children entities. + * + * + * @param {array} + * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * The wrapper that contains the map with application health policies used to + * evaluate specific applications in the cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getAadMetadataWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getAadMetadata(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AadMetadataObject} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AadMetadataObject} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getAadMetadata(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getAadMetadata(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getAadMetadata(options, optionalCallback); + } + } + + /** + * @summary Gets the list of nodes in the Service Fabric cluster. + * + * Gets the list of nodes in the Service Fabric cluster. The response includes + * the name, status, id, health, uptime, and other details about the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {string} [options.nodeStatusFilter] 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' + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNodeInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getNodeInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the list of nodes in the Service Fabric cluster. + * + * Gets the list of nodes in the Service Fabric cluster. The response includes + * the name, status, id, health, uptime, and other details about the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. + * + * @param {string} [options.nodeStatusFilter] 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' + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedNodeInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedNodeInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeInfoList(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNodeInfoList(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNodeInfoList(options, optionalCallback); + } + } + + /** + * @summary Gets the information about a specific node in the Service Fabric + * cluster. + * + * Gets the information about a specific node in the Service Fabric Cluster. + * The response includes the name, status, id, health, uptime, and other + * details about the node. + * + * @param {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNodeInfoWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getNodeInfo(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the information about a specific node in the Service Fabric + * cluster. + * + * Gets the information about a specific node in the Service Fabric Cluster. + * The response includes the name, status, id, health, uptime, and other + * details about the node. + * + * @param {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NodeInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeInfo(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNodeInfo(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNodeInfo(nodeName, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNodeHealthWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getNodeHealth(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NodeHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeHealth(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNodeHealth(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNodeHealth(nodeName, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {object} [options.clusterHealthPolicy] 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. + * + * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * + * + * @param {number} + * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * + * + * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNodeHealthUsingPolicyWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {object} [options.clusterHealthPolicy] 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. + * + * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * + * + * @param {number} + * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * + * + * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NodeHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeHealthUsingPolicy(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNodeHealthUsingPolicy(nodeName, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + reportNodeHealthWithHttpOperationResponse(nodeName, healthInformation, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + reportNodeHealth(nodeName, healthInformation, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._reportNodeHealth(nodeName, healthInformation, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNodeLoadInfoWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {NodeLoadInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeLoadInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNodeLoadInfo(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNodeLoadInfo(nodeName, options, optionalCallback); + } + } + + /** + * @summary 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 which is was deactivated + * with the Pause intent can be deactivated further with Restart, but not the + * other way around. Nodes may be reactivated using the Activate a node + * operation any time after they are deactivated. If the deactivation is not + * complete this will cancel the deactivation. A node which goes down and comes + * back up while deactivated will still need to be reactivated before services + * will be placed on that node. + * + * @param {string} nodeName The name of the node. + * + * @param {object} deactivationIntentDescription Describes the intent or reason + * for deactivating the node. + * + * @param {string} [deactivationIntentDescription.deactivationIntent] Describes + * the intent or reason for deactivating the node. The possible values are + * following. + * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + disableNodeWithHttpOperationResponse(nodeName, deactivationIntentDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 which is was deactivated + * with the Pause intent can be deactivated further with Restart, but not the + * other way around. Nodes may be reactivated using the Activate a node + * operation any time after they are deactivated. If the deactivation is not + * complete this will cancel the deactivation. A node which goes down and comes + * back up while deactivated will still need to be reactivated before services + * will be placed on that node. + * + * @param {string} nodeName The name of the node. + * + * @param {object} deactivationIntentDescription Describes the intent or reason + * for deactivating the node. + * + * @param {string} [deactivationIntentDescription.deactivationIntent] Describes + * the intent or reason for deactivating the node. The possible values are + * following. + * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + disableNode(nodeName, deactivationIntentDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._disableNode(nodeName, deactivationIntentDescription, options, optionalCallback); + } + } + + /** + * @summary Activate a Service Fabric cluster node which is currently + * deactivated. + * + * Activates a Service Fabric cluster node which 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + enableNodeWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._enableNode(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Activate a Service Fabric cluster node which is currently + * deactivated. + * + * Activates a Service Fabric cluster node which 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + enableNode(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._enableNode(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._enableNode(nodeName, options, optionalCallback); + } + } + + /** + * @summary Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. + * + * Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. This implies that it is not possible to + * recover the persisted state of that node. This generally happens if a hard + * disk has been wiped clean, or if a hard disk crashes. The node has to be + * down for this operation to be successful. This operation lets Service Fabric + * know that the replicas on that node no longer exist, and that Service Fabric + * should stop waiting for those replicas to come back up. Do not run this + * cmdlet if the state on the node has not been removed and the node can comes + * back up with its state intact. + * + * @param {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + removeNodeStateWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._removeNodeState(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. + * + * Notifies Service Fabric that the persisted state on a node has been + * permanently removed or lost. This implies that it is not possible to + * recover the persisted state of that node. This generally happens if a hard + * disk has been wiped clean, or if a hard disk crashes. The node has to be + * down for this operation to be successful. This operation lets Service Fabric + * know that the replicas on that node no longer exist, and that Service Fabric + * should stop waiting for those replicas to come back up. Do not run this + * cmdlet if the state on the node has not been removed and the node can comes + * back up with its state intact. + * + * @param {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + removeNodeState(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._removeNodeState(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._removeNodeState(nodeName, options, optionalCallback); + } + } + + /** + * @summary Restarts a Service Fabric cluster node. + * + * Restarts a Service Fabric cluster node that is already started. + * + * @param {string} nodeName The name of the node. + * + * @param {object} restartNodeDescription The instance of the node to be + * restarted and a flag indicating the need to take dump of the fabric process. + * + * @param {string} restartNodeDescription.nodeInstanceId 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 {string} [restartNodeDescription.createFabricDump] Specify True to + * create a dump of the fabric node process. This is case sensitive. Possible + * values include: 'False', 'True' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + restartNodeWithHttpOperationResponse(nodeName, restartNodeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Restarts a Service Fabric cluster node. + * + * Restarts a Service Fabric cluster node that is already started. + * + * @param {string} nodeName The name of the node. + * + * @param {object} restartNodeDescription The instance of the node to be + * restarted and a flag indicating the need to take dump of the fabric process. + * + * @param {string} restartNodeDescription.nodeInstanceId 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 {string} [restartNodeDescription.createFabricDump] Specify True to + * create a dump of the fabric node process. This is case sensitive. Possible + * values include: 'False', 'True' + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + restartNode(nodeName, restartNodeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._restartNode(nodeName, restartNodeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 3 application + * types, or if max results is set to 3, then 3 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 {object} [options] Optional Parameters. + * + * @param {number} [options.applicationTypeDefinitionKindFilter] 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. + * + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationTypeInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationTypeInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 3 application + * types, or if max results is set to 3, then 3 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 {object} [options] Optional Parameters. + * + * @param {number} [options.applicationTypeDefinitionKindFilter] 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. + * + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationTypeInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationTypeInfoList(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationTypeInfoList(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationTypeInfoList(options, optionalCallback); + } + } + + /** + * @summary 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 3 application + * types, or if max results is set to 3, then 3 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 {string} applicationTypeName The name of the application type. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.applicationTypeVersion] The version of the + * application type. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 3 application + * types, or if max results is set to 3, then 3 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 {string} applicationTypeName The name of the application type. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.applicationTypeVersion] The version of the + * application type. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationTypeInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback); + } + } + + /** + * @summary 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 {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. + * + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async 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. + * + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + provisionApplicationTypeWithHttpOperationResponse(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The + * base type of provision application type description which supports either + * image store-based provision or external store-based provision. + * + * @param {boolean} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.async 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. + * + * @param {string} + * provisionApplicationTypeDescriptionBaseRequiredBodyParam.kind Polymorphic + * Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._provisionApplicationType(provisionApplicationTypeDescriptionBaseRequiredBodyParam, options, optionalCallback); + } + } + + /** + * @summary Removes or unregisters a Service Fabric application type from the + * cluster. + * + * Removes or unregisters a Service Fabric application type from the cluster. + * This operation can only be performed if all application instances of the + * application type has been deleted. Once the application type is + * unregistered, no new application instances can be created for this + * particular application type. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. + * + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. + * + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] 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 to set it to true + * for large application packages that were provisioned. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Removes or unregisters a Service Fabric application type from the + * cluster. + * + * Removes or unregisters a Service Fabric application type from the cluster. + * This operation can only be performed if all application instances of the + * application type has been deleted. Once the application type is + * unregistered, no new application instances can be created for this + * particular application type. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {object} unprovisionApplicationTypeDescriptionInfo The relative path + * for the application package in the image store specified during the prior + * copy operation. + * + * @param {string} + * unprovisionApplicationTypeDescriptionInfo.applicationTypeVersion The version + * of the application type as defined in the application manifest. + * + * @param {boolean} [unprovisionApplicationTypeDescriptionInfo.async] 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 to set it to true + * for large application packages that were provisioned. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._unprovisionApplicationType(applicationTypeName, unprovisionApplicationTypeDescriptionInfo, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getServiceTypeInfoListWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback); + } + } + + /** + * @summary 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 specificed service type is not found in the + * cluster. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getServiceTypeInfoByNameWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceTypeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 specificed service type is not found in the + * cluster. + * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceTypeInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, serviceTypeName, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getServiceManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceManifestName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. + * + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ServiceTypeManifest} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceTypeManifest} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedServiceTypeInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedServiceTypeInfoByNameWithHttpOperationResponse(nodeName, applicationId, serviceTypeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric + * service type. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Array} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback); + } + } + + /** + * @summary Creates a Service Fabric application. + * + * Creates a Service Fabric application using the specified description. + * + * @param {object} applicationDescription Description for creating an + * application. + * + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. + * + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. + * + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * + * @param {object} [applicationDescription.applicationCapacity] 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 {number} [applicationDescription.applicationCapacity.minimumNodes] + * 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. + * + * @param {number} [applicationDescription.applicationCapacity.maximumNodes] + * 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. + * + * @param {array} + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createApplicationWithHttpOperationResponse(applicationDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createApplication(applicationDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates a Service Fabric application. + * + * Creates a Service Fabric application using the specified description. + * + * @param {object} applicationDescription Description for creating an + * application. + * + * @param {string} applicationDescription.name The name of the application, + * including the 'fabric:' URI scheme. + * + * @param {string} applicationDescription.typeName The application type name as + * defined in the application manifest. + * + * @param {string} applicationDescription.typeVersion The version of the + * application type as defined in the application manifest. + * + * @param {array} [applicationDescription.parameterList] List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * + * @param {object} [applicationDescription.applicationCapacity] 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 {number} [applicationDescription.applicationCapacity.minimumNodes] + * 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. + * + * @param {number} [applicationDescription.applicationCapacity.maximumNodes] + * 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. + * + * @param {array} + * [applicationDescription.applicationCapacity.applicationMetrics] List of + * application capacity metric description. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createApplication(applicationDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createApplication(applicationDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createApplication(applicationDescription, options, optionalCallback); + } + } + + /** + * @summary Deletes an existing Service Fabric application. + * + * Deletes an existing Service Fabric application. An application must be + * created before it can be deleted. Deleting an application will delete all + * services that are part of that application. By default, Service Fabric will + * try to close service replicas in a graceful manner and then delete the + * service. However, if a service is having issues closing the replica + * gracefully, the delete operation may take a long time or get stuck. Use the + * optional ForceRemove flag to skip the graceful close sequence and forcefully + * delete the application and all of the its services. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {boolean} [options.forceRemove] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteApplicationWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._deleteApplication(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes an existing Service Fabric application. + * + * Deletes an existing Service Fabric application. An application must be + * created before it can be deleted. Deleting an application will delete all + * services that are part of that application. By default, Service Fabric will + * try to close service replicas in a graceful manner and then delete the + * service. However, if a service is having issues closing the replica + * gracefully, the delete operation may take a long time or get stuck. Use the + * optional ForceRemove flag to skip the graceful close sequence and forcefully + * delete the application and all of the its services. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {boolean} [options.forceRemove] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteApplication(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteApplication(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteApplication(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationLoadInfoWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationLoadInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationLoadInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationLoadInfo(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationLoadInfo(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.applicationDefinitionKindFilter] 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. + * + * + * @param {string} [options.applicationTypeName] The application type name used + * to filter the applications to query for. This value should not contain the + * application type version. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationInfoListWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationInfoList(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. + * + * @param {number} [options.applicationDefinitionKindFilter] 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. + * + * + * @param {string} [options.applicationTypeName] The application type name used + * to filter the applications to query for. This value should not contain the + * application type version. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedApplicationInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedApplicationInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationInfoList(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationInfoList(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationInfoList(options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationInfoWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {boolean} [options.excludeApplicationParameters] The flag that + * specifies whether application parameters will be excluded from the result. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationInfo} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationInfo(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationInfo(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. + * + * + * @param {number} [options.servicesHealthStateFilter] 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 value + * 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationHealthWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationHealth(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. + * + * + * @param {number} [options.servicesHealthStateFilter] 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 value + * 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationHealth(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationHealth(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationHealth(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. + * + * + * @param {number} [options.servicesHealthStateFilter] 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 value + * 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationHealthUsingPolicyWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. + * + * + * @param {number} [options.servicesHealthStateFilter] 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 value + * 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationHealth} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationHealthUsingPolicy(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationHealthUsingPolicy(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + reportApplicationHealthWithHttpOperationResponse(applicationId, healthInformation, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + reportApplicationHealth(applicationId, healthInformation, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._reportApplicationHealth(applicationId, healthInformation, options, optionalCallback); + } + } + + /** + * @summary 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. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application + * upgrade. + * + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. + * + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * + * + * @param {boolean} + * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} + * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + startApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application + * upgrade. + * + * @param {string} applicationUpgradeDescription.name The name of the target + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * The target application type version (found in the application manifest) for + * the application upgrade. + * + * @param {array} applicationUpgradeDescription.parameters List of application + * parameters with overridden values from their default values specified in the + * application manifest. + * + * @param {string} applicationUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] The mode + * used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] 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). + * + * @param {boolean} [applicationUpgradeDescription.forceRestart] If true, then + * processes are forcefully restarted during upgrade even when the code version + * has not changed (the upgrade only changes configuration or data). + * + * @param {object} [applicationUpgradeDescription.monitoringPolicy] Describes + * the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] + * Defines a health policy used to evaluate the health of an application or one + * of its children entities. + * + * + * @param {boolean} + * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} + * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getApplicationUpgradeWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ApplicationUpgradeProgressInfo} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ApplicationUpgradeProgressInfo} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getApplicationUpgrade(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getApplicationUpgrade(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating + * an existing application upgrade. + * + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). + * + * @param {number} + * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] 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' + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeUpdateDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating + * an existing application upgrade. + * + * @param {string} applicationUpgradeUpdateDescription.name The name of the + * application, including the 'fabric:' URI scheme. + * + * @param {string} applicationUpgradeUpdateDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} + * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {object} [applicationUpgradeUpdateDescription.updateDescription] + * Describes the parameters for updating a rolling upgrade of application or + * cluster. + * + * @param {string} + * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {boolean} + * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] If + * true, then processes are forcefully restarted during upgrade even when the + * code version has not changed (the upgrade only changes configuration or + * data). + * + * @param {number} + * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * 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). + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.failureAction] 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' + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters + * for resuming an application upgrade. + * + * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The + * name of the upgrade domain in which to resume the upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + resumeApplicationUpgradeWithHttpOperationResponse(applicationId, resumeApplicationUpgradeDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters + * for resuming an application upgrade. + * + * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The + * name of the upgrade domain in which to resume the upgrade. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback); + } + } + + /** + * @summary 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 rollback 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + rollbackApplicationUpgradeWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 rollback 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + rollbackApplicationUpgrade(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._rollbackApplicationUpgrade(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedApplicationInfoListWithHttpOperationResponse(nodeName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedDeployedApplicationInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedDeployedApplicationInfoList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedApplicationInfoList(nodeName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedApplicationInfoList(nodeName, options, optionalCallback); + } + } + + /** + * @summary Gets the information about an application deployed on a Service + * Fabric node. * - * 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. + * 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. * - * 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 (for e.g when using azuer 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterManifestWithHttpOperationResponse(options) { + getDeployedApplicationInfoWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterManifest(options, (err, result, request, response) => { + self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -25202,29 +47128,44 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the Service Fabric cluster manifest. + * @summary Gets the information about an application deployed on a Service + * Fabric node. * - * 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. + * 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. * - * 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 (for e.g when using azuer 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.includeHealthState] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -25236,7 +47177,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterManifest} - The deserialized result object. + * @resolve {DeployedApplicationInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -25245,13 +47186,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterManifest} for more information. + * See {@link DeployedApplicationInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterManifest(options, optionalCallback) { + getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -25260,41 +47202,51 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterManifest(options, (err, result, request, response) => { + self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterManifest(options, optionalCallback); + return self._getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric cluster. + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. * - * 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. + * 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {number} [options.nodesHealthStateFilter] 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. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -25308,20 +47260,19 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * - * @param {number} [options.applicationsHealthStateFilter] 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. + * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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 @@ -25335,6 +47286,64 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * * @param {number} [options.eventsHealthStateFilter] 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 @@ -25359,6 +47368,32 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * + * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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. + * + * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by * default. @@ -25366,70 +47401,123 @@ class ServiceFabricClient extends ServiceClient { * Warning, and Error. * * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {function} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @reject {Error} - The error object. + * {Promise} A promise is returned + * + * @resolve {DeployedApplicationHealth} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedApplicationHealth} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterHealthWithHttpOperationResponse(options) { + getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; - return new Promise((resolve, reject) => { - self._getClusterHealth(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); }); - }); + } else { + return self._getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback); + } } /** - * @summary Gets the health of a Service Fabric cluster. + * @summary Gets the information about health of an application deployed on a + * Service Fabric node. using the specified policy. * - * Gets the health of a Service Fabric cluster. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to - * filter the collection of nodes and applications returned based on their - * aggregated health state. + * 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {number} [options.nodesHealthStateFilter] 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. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 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. + * The state values are flag based enumeration, so the value can be a + * combination of these value obtained using 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 @@ -25443,20 +47531,159 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * - * @param {number} [options.applicationsHealthStateFilter] 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. + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getDeployedApplicationHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * * - Default - Default value. Matches any HealthState. The value is zero. * - None - Filter that doesn't match any HealthState value. Used in order to @@ -25470,17 +47697,19 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * - * @param {number} [options.eventsHealthStateFilter] Allows filtering the - * collection of HealthEvent objects returned based on health state. + * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 events that match the filter are returned. All events are used to - * evaluate the aggregated health state. - * If not specified, all entries are returned. The state values are flag based - * enumeration, so the value could be a combination of these value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * 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 value obtained using 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 @@ -25494,6 +47723,84 @@ class ServiceFabricClient extends ServiceClient { * 65535. * * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * * @param {boolean} [options.excludeHealthStatistics] Indicates whether the * health statistics should be returned as part of the query result. False by * default. @@ -25501,22 +47808,10 @@ class ServiceFabricClient extends ServiceClient { * Warning, and Error. * * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -25528,7 +47823,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterHealth} - The deserialized result object. + * @resolve {DeployedApplicationHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -25537,13 +47832,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealth} for more information. + * See {@link DeployedApplicationHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterHealth(options, optionalCallback) { + getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -25552,205 +47848,163 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterHealth(options, (err, result, request, response) => { + self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterHealth(options, optionalCallback); + return self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric cluster using the specified - * policy. - * - * Gets the health of a Service Fabric cluster. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter 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 {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] 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. + * @summary 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 {number} [options.applicationsHealthStateFilter] 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. + * @param {string} nodeName The name of the node. * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} healthInformation 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. * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * - * @param {boolean} [options.excludeHealthStatistics] 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. * + * @param {string} healthInformation.property 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. * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * 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. + * Together with the SourceId, the property uniquely identifies the health + * information. * * - * @param {object} [options.clusterHealthPolicies] 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. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] + * If not specified, time to live defaults to infinite value. * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] * - * @param {boolean} - * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {string} [healthInformation.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. * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * @param {string} [healthInformation.sequenceNumber] 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. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag which 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. * - * @param {array} - * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterHealthUsingPolicyWithHttpOperationResponse(options) { + reportDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { + self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -25761,178 +48015,136 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric cluster using the specified - * policy. - * - * Gets the health of a Service Fabric cluster. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the cluster based on the health state. - * Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter 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 {object} [options] Optional Parameters. - * - * @param {number} [options.nodesHealthStateFilter] 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. - * - * - * @param {number} [options.applicationsHealthStateFilter] 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. + * @summary 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 {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} nodeName The name of the node. * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {boolean} [options.excludeHealthStatistics] 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. * + * @param {object} healthInformation 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. * - * @param {boolean} [options.includeSystemApplicationHealthStatistics] - * 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. + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * * - * @param {object} [options.clusterHealthPolicies] 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. + * @param {string} healthInformation.property 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. * - * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * - * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {boolean} - * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * If not specified, time to live defaults to infinite value. * - * 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. + * @param {string} [healthInformation.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. * * - * @param {number} - * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * @param {string} [healthInformation.sequenceNumber] 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. * - * 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. + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * * - * @param {array} - * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -25944,7 +48156,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -25952,14 +48164,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterHealthUsingPolicy(options, optionalCallback) { + reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -25968,49 +48179,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterHealthUsingPolicy(options, (err, result, request, response) => { + self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterHealthUsingPolicy(options, optionalCallback); + return self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric cluster using health chunks. + * @summary Gets the manifest describing an application type. * - * 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. + * Gets the manifest describing an application type. The response contains the + * application manifest XML as a string. * + * @param {string} applicationTypeName The name of the application type. + * + * @param {string} applicationTypeVersion The version of the application type. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterHealthChunkWithHttpOperationResponse(options) { + getApplicationManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterHealthChunk(options, (err, result, request, response) => { + self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26021,22 +48231,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric cluster using health chunks. + * @summary Gets the manifest describing an application type. * - * 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. + * Gets the manifest describing an application type. The response contains the + * application manifest XML as a string. + * + * @param {string} applicationTypeName The name of the application type. * + * @param {string} applicationTypeVersion The version of the application type. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26048,7 +48257,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterHealthChunk} - The deserialized result object. + * @resolve {ApplicationTypeManifest} - The deserialized result object. * * @reject {Error} - The error object. * @@ -26057,13 +48266,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealthChunk} for more information. + * See {@link ApplicationTypeManifest} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterHealthChunk(options, optionalCallback) { + getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26072,156 +48282,199 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterHealthChunk(options, (err, result, request, response) => { + self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterHealthChunk(options, optionalCallback); + return self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric cluster using health chunks. + * @summary Gets the information about all services belonging to the + * application specified by the application id. * - * 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. + * Returns the information about all services belonging to the application + * specified by the application id. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {object} [options.clusterHealthChunkQueryDescription] 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. + * @param {string} [options.serviceTypeName] The service type name used to + * filter the services to query for. * + * @param {string} [options.continuationToken] 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. * - * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] - * 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationFilters] 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. + * @returns {Promise} A promise is returned * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] + * @reject {Error} - The error object. + */ + getServiceInfoListWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the information about all services belonging to the + * application specified by the application id. * - * @param {boolean} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * Returns the information about all services belonging to the application + * specified by the application id. * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * 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. + * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceTypeName] The service type name used to + * filter the services to query for. * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * @param {string} [options.continuationToken] 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. * - * 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {function} [optionalCallback] - The optional callback. * - * @param {object} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PagedServiceInfoList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServiceInfoList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceInfoList(applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceInfoList(applicationId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterHealthChunkUsingPolicyAndAdvancedFiltersWithHttpOperationResponse(options) { + getServiceInfoWithHttpOperationResponse(applicationId, serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { + self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26232,129 +48485,150 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric cluster using health chunks. + * @summary Gets the information about the specific service belonging to the + * Service Fabric application. * - * 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. + * Returns the information about the specified service belonging to the + * specified Service Fabric application. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * * * @param {object} [options] Optional Parameters. * - * @param {object} [options.clusterHealthChunkQueryDescription] 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] - * 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. + * @param {function} [optionalCallback] - The optional callback. * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationFilters] 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. + * {Promise} A promise is returned * + * @resolve {ServiceInfo} - The deserialized result object. * - * @param {object} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] + * @reject {Error} - The error object. * - * @param {boolean} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * {Error} err - The Error object if an error occurred, null otherwise. * - * 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceInfo} for more information. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getServiceInfo(applicationId, serviceId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getServiceInfo(applicationId, serviceId, options, optionalCallback); + } + } + + /** + * @summary 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 {number} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * 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. * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} - * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @returns {Promise} A promise is returned * - * @param {object} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} - * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] + * @reject {Error} - The error object. + */ + getApplicationNameInfoWithHttpOperationResponse(serviceId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26366,7 +48640,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterHealthChunk} - The deserialized result object. + * @resolve {ApplicationNameInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -26375,13 +48649,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterHealthChunk} for more information. + * See {@link ApplicationNameInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback) { + getApplicationNameInfo(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26390,134 +48664,97 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, (err, result, request, response) => { + self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, optionalCallback); + return self._getApplicationNameInfo(serviceId, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric cluster. + * @summary Creates the specified Service Fabric service. * - * 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. + * 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} healthInformation 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. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {object} serviceDescription The information necessary to create a + * service. * + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} healthInformation.property 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. + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @param {string} serviceDescription.partitionDescription.partitionScheme + * Polymorphic Discriminator * - * If not specified, time to live defaults to infinite value. + * @param {string} [serviceDescription.placementConstraints] 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)". * + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {string} [healthInformation.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. + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' * + * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates + * if the DefaultMoveCost property is specified. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' * + * @param {string} [serviceDescription.serviceDnsName] The DNS name of the + * service. It requires the DNS system service to be enabled in Service Fabric + * cluster. * - * @param {object} [options] Optional Parameters. + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. * - * @param {boolean} [options.immediate] A flag which 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. + * @param {string} serviceDescription.serviceKind Polymorphic Discriminator * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26528,11 +48765,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportClusterHealthWithHttpOperationResponse(healthInformation, options) { + createServiceWithHttpOperationResponse(applicationId, serviceDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26543,122 +48780,85 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric cluster. + * @summary Creates the specified Service Fabric service. * - * 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. + * 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 {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} healthInformation 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. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {object} serviceDescription The information necessary to create a + * service. * + * @param {string} [serviceDescription.applicationName] The name of the + * application, including the 'fabric:' URI scheme. * - * @param {string} healthInformation.property 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. + * @param {string} serviceDescription.serviceName The full name of the service + * with 'fabric:' URI scheme. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {string} serviceDescription.serviceTypeName Name of the service type + * as specified in the service manifest. * + * @param {array} [serviceDescription.initializationData] The initialization + * data as an array of bytes. Initialization data is passed to service + * instances or replicas when they are created. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {object} serviceDescription.partitionDescription The partition + * description as an object. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @param {string} serviceDescription.partitionDescription.partitionScheme + * Polymorphic Discriminator * - * If not specified, time to live defaults to infinite value. + * @param {string} [serviceDescription.placementConstraints] 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)". * + * @param {array} [serviceDescription.correlationScheme] The correlation + * scheme. * - * @param {string} [healthInformation.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. + * @param {array} [serviceDescription.serviceLoadMetrics] The service load + * metrics. * + * @param {array} [serviceDescription.servicePlacementPolicies] The service + * placement policies. * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {string} [serviceDescription.defaultMoveCost] The move cost for the + * service. Possible values include: 'Zero', 'Low', 'Medium', 'High' * + * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates + * if the DefaultMoveCost property is specified. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {string} [serviceDescription.servicePackageActivationMode] The + * activation mode of service package to be used for a service. Possible values + * include: 'SharedProcess', 'ExclusiveProcess' * + * @param {string} [serviceDescription.serviceDnsName] The DNS name of the + * service. It requires the DNS system service to be enabled in Service Fabric + * cluster. * - * @param {object} [options] Optional Parameters. + * @param {array} [serviceDescription.scalingPolicies] Scaling policies for + * this service. * - * @param {boolean} [options.immediate] A flag which 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. + * @param {string} serviceDescription.serviceKind Polymorphic Discriminator * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26684,7 +48884,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportClusterHealth(healthInformation, options, optionalCallback) { + createService(applicationId, serviceDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26693,48 +48893,80 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportClusterHealth(healthInformation, options, (err, result, request, response) => { + self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportClusterHealth(healthInformation, options, optionalCallback); + return self._createService(applicationId, serviceDescription, options, optionalCallback); } } /** - * @summary Gets a list of fabric code versions that are provisioned in a - * Service Fabric cluster. + * @summary Creates a Service Fabric service from the service template. * - * 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. + * 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 {object} [options] Optional Parameters. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} [options.codeVersion] The product version of Service Fabric. + * + * @param {object} serviceFromTemplateDescription Describes the service that + * needs to be created from the template defined in the application manifest. + * + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. + * + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. + * + * @param {string} + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name + * of the service. It requires the DNS system service to be enabled in Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getProvisionedFabricCodeVersionInfoListWithHttpOperationResponse(options) { + createServiceFromTemplateWithHttpOperationResponse(applicationId, serviceFromTemplateDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { + self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26745,21 +48977,53 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of fabric code versions that are provisioned in a - * Service Fabric cluster. + * @summary Creates a Service Fabric service from the service template. * - * 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. + * 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 {object} [options] Optional Parameters. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} [options.codeVersion] The product version of Service Fabric. + * + * @param {object} serviceFromTemplateDescription Describes the service that + * needs to be created from the template defined in the application manifest. + * + * @param {string} serviceFromTemplateDescription.applicationName The name of + * the application, including the 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceName The full name of + * the service with 'fabric:' URI scheme. + * + * @param {string} serviceFromTemplateDescription.serviceTypeName Name of the + * service type as specified in the service manifest. + * + * @param {array} [serviceFromTemplateDescription.initializationData] The + * initialization data for the newly created service instance. + * + * @param {string} + * [serviceFromTemplateDescription.servicePackageActivationMode] The activation + * mode of service package to be used for a service. Possible values include: + * 'SharedProcess', 'ExclusiveProcess' + * + * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name + * of the service. It requires the DNS system service to be enabled in Service + * Fabric cluster. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26771,7 +49035,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -26779,13 +49043,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getProvisionedFabricCodeVersionInfoList(options, optionalCallback) { + createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26794,49 +49058,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getProvisionedFabricCodeVersionInfoList(options, (err, result, request, response) => { + self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getProvisionedFabricCodeVersionInfoList(options, optionalCallback); + return self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback); } } /** - * @summary Gets a list of fabric config versions that are provisioned in a - * Service Fabric cluster. + * @summary Deletes an existing Service Fabric service. + * + * Deletes an existing Service Fabric service. A service must be created before + * it can be deleted. By default, Service Fabric will try to close service + * replicas in a graceful manner and then delete the service. However, if the + * service is having issues closing the replica gracefully, the delete + * operation may take a long time or get stuck. Use the optional ForceRemove + * flag to skip the graceful close sequence and forcefully delete the service. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * 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 {object} [options] Optional Parameters. * - * @param {string} [options.configVersion] The config version of Service - * Fabric. + * @param {boolean} [options.forceRemove] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getProvisionedFabricConfigVersionInfoListWithHttpOperationResponse(options) { + deleteServiceWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + self._deleteService(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26847,22 +49125,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of fabric config versions that are provisioned in a - * Service Fabric cluster. + * @summary Deletes an existing Service Fabric service. + * + * Deletes an existing Service Fabric service. A service must be created before + * it can be deleted. By default, Service Fabric will try to close service + * replicas in a graceful manner and then delete the service. However, if the + * service is having issues closing the replica gracefully, the delete + * operation may take a long time or get stuck. Use the optional ForceRemove + * flag to skip the graceful close sequence and forcefully delete the service. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * 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 {object} [options] Optional Parameters. * - * @param {string} [options.configVersion] The config version of Service - * Fabric. + * @param {boolean} [options.forceRemove] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26874,7 +49166,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -26882,13 +49174,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getProvisionedFabricConfigVersionInfoList(options, optionalCallback) { + deleteService(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26897,44 +49189,124 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getProvisionedFabricConfigVersionInfoList(options, (err, result, request, response) => { + self._deleteService(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getProvisionedFabricConfigVersionInfoList(options, optionalCallback); + return self._deleteService(serviceId, options, optionalCallback); } } /** - * @summary Gets the progress of the current cluster upgrade. + * @summary Updates a Service Fabric service using the specified update + * description. * - * Gets the current progress of the ongoing cluster upgrade. If no upgrade is - * currently in progress, gets the last state of the previous cluster upgrade. + * 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. Please 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} serviceUpdateDescription The information necessary to update + * a service. + * + * @param {string} [serviceUpdateDescription.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. + * + * + * @param {string} [serviceUpdateDescription.placementConstraints] 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)". + * + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. + * + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. + * + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. + * + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. + * + * @param {string} serviceUpdateDescription.serviceKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterUpgradeProgressWithHttpOperationResponse(options) { + updateServiceWithHttpOperationResponse(serviceId, serviceUpdateDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterUpgradeProgress(options, (err, result, request, response) => { + self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -26945,17 +49317,97 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of the current cluster upgrade. + * @summary 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. Please 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} serviceUpdateDescription The information necessary to update + * a service. + * + * @param {string} [serviceUpdateDescription.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. + * + * + * @param {string} [serviceUpdateDescription.placementConstraints] 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)". * - * Gets the current progress of the ongoing cluster upgrade. If no upgrade is - * currently in progress, gets the last state of the previous cluster upgrade. + * @param {array} [serviceUpdateDescription.correlationScheme] The correlation + * scheme. + * + * @param {array} [serviceUpdateDescription.loadMetrics] The service load + * metrics. + * + * @param {array} [serviceUpdateDescription.servicePlacementPolicies] The + * service placement policies. + * + * @param {string} [serviceUpdateDescription.defaultMoveCost] The move cost for + * the service. Possible values include: 'Zero', 'Low', 'Medium', 'High' + * + * @param {array} [serviceUpdateDescription.scalingPolicies] Scaling policies + * for this service. + * + * @param {string} serviceUpdateDescription.serviceKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -26967,7 +49419,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterUpgradeProgressObject} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -26975,15 +49427,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterUpgradeProgressObject} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterUpgradeProgress(options, optionalCallback) { + updateService(serviceId, serviceUpdateDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -26992,50 +49442,53 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterUpgradeProgress(options, (err, result, request, response) => { + self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterUpgradeProgress(options, optionalCallback); + return self._updateService(serviceId, serviceUpdateDescription, options, optionalCallback); } } /** - * @summary Get the Service Fabric standalone cluster configuration. + * @summary Gets the description of an existing Service Fabric service. * - * 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. + * Gets the description of an existing Service Fabric service. A service must + * be created before its description can be obtained. * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} configurationApiVersion The API version of the Standalone - * cluster json configuration. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterConfigurationWithHttpOperationResponse(configurationApiVersion, options) { + getServiceDescriptionWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + self._getServiceDescription(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27046,23 +49499,26 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the Service Fabric standalone cluster configuration. + * @summary Gets the description of an existing Service Fabric service. * - * 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. + * Gets the description of an existing Service Fabric service. A service must + * be created before its description can be obtained. * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} configurationApiVersion The API version of the Standalone - * cluster json configuration. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27074,7 +49530,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterConfiguration} - The deserialized result object. + * @resolve {ServiceDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27083,13 +49539,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterConfiguration} for more information. + * See {@link ServiceDescription} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterConfiguration(configurationApiVersion, options, optionalCallback) { + getServiceDescription(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27098,46 +49554,115 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterConfiguration(configurationApiVersion, options, (err, result, request, response) => { + self._getServiceDescription(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterConfiguration(configurationApiVersion, options, optionalCallback); + return self._getServiceDescription(serviceId, options, optionalCallback); } } /** - * @summary Get the cluster configuration upgrade status of a Service Fabric - * standalone cluster. + * @summary Gets the health of the specified Service Fabric service. * - * Get the cluster configuration upgrade status of a Service Fabric standalone - * cluster. + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.partitionsHealthStateFilter] 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getClusterConfigurationUpgradeStatusWithHttpOperationResponse(options) { + getServiceHealthWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + self._getServiceHealth(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27148,19 +49673,88 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Get the cluster configuration upgrade status of a Service Fabric - * standalone cluster. + * @summary Gets the health of the specified Service Fabric service. * - * Get the cluster configuration upgrade status of a Service Fabric standalone - * cluster. + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.partitionsHealthStateFilter] 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. + * + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27172,7 +49766,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ClusterConfigurationUpgradeStatusInfo} - The deserialized result object. + * @resolve {ServiceHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27181,14 +49775,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ClusterConfigurationUpgradeStatusInfo} for - * more information. + * See {@link ServiceHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getClusterConfigurationUpgradeStatus(options, optionalCallback) { + getServiceHealth(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27197,54 +49790,199 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getClusterConfigurationUpgradeStatus(options, (err, result, request, response) => { + self._getServiceHealth(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getClusterConfigurationUpgradeStatus(options, optionalCallback); + return self._getServiceHealth(serviceId, options, optionalCallback); } } /** - * @summary Provision the code or configuration packages of a Service Fabric - * cluster. + * @summary Gets the health of the specified Service Fabric service, by using + * the specified health policy. * - * Validate and provision the code or configuration packages of a Service - * Fabric cluster. + * 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 {object} provisionFabricDescription Describes the parameters for - * provisioning a cluster. * - * @param {string} [provisionFabricDescription.codeFilePath] The cluster code - * package file path. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} [provisionFabricDescription.clusterManifestFilePath] The - * cluster manifest file path. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.partitionsHealthStateFilter] 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. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - provisionClusterWithHttpOperationResponse(provisionFabricDescription, options) { + getServiceHealthUsingPolicyWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { + self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27255,27 +49993,172 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Provision the code or configuration packages of a Service Fabric - * cluster. + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {number} [options.partitionsHealthStateFilter] 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. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. * - * Validate and provision the code or configuration packages of a Service - * Fabric cluster. * - * @param {object} provisionFabricDescription Describes the parameters for - * provisioning a cluster. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum maximum allowed percentage of unhealthy services. Allowed values + * are Byte values from zero to 100. * - * @param {string} [provisionFabricDescription.codeFilePath] The cluster code - * package file path. + * 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. * - * @param {string} [provisionFabricDescription.clusterManifestFilePath] The - * cluster manifest file path. * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] 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. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27287,7 +50170,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27295,13 +50178,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - provisionCluster(provisionFabricDescription, options, optionalCallback) { + getServiceHealthUsingPolicy(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27310,38 +50194,145 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._provisionCluster(provisionFabricDescription, options, (err, result, request, response) => { + self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._provisionCluster(provisionFabricDescription, options, optionalCallback); + return self._getServiceHealthUsingPolicy(serviceId, options, optionalCallback); } } /** - * @summary Unprovision the code or configuration packages of a Service Fabric - * cluster. + * @summary Sends a health report on the Service Fabric service. * - * Unprovision the code or configuration packages of a Service Fabric cluster. + * 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 {object} unprovisionFabricDescription Describes the parameters for - * unprovisioning a cluster. * - * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code - * package version. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * @param {string} [unprovisionFabricDescription.configVersion] The cluster - * manifest version. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag which 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27352,11 +50343,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - unprovisionClusterWithHttpOperationResponse(unprovisionFabricDescription, options) { + reportServiceHealthWithHttpOperationResponse(serviceId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { + self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27367,26 +50358,133 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Unprovision the code or configuration packages of a Service Fabric - * cluster. + * @summary Sends a health report on the Service Fabric service. * - * Unprovision the code or configuration packages of a Service Fabric cluster. + * 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 {object} unprovisionFabricDescription Describes the parameters for - * unprovisioning a cluster. * - * @param {string} [unprovisionFabricDescription.codeVersion] The cluster code - * package version. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * @param {string} [unprovisionFabricDescription.configVersion] The cluster - * manifest version. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag which 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27412,7 +50510,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - unprovisionCluster(unprovisionFabricDescription, options, optionalCallback) { + reportServiceHealth(serviceId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27421,43 +50519,74 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._unprovisionCluster(unprovisionFabricDescription, options, (err, result, request, response) => { + self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._unprovisionCluster(unprovisionFabricDescription, options, optionalCallback); + return self._reportServiceHealth(serviceId, healthInformation, options, optionalCallback); } } /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Resolve a Service Fabric partition. + * + * Resolve a Service Fabric service partition to get the endpoints of the + * service replicas. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * Rollback the upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.partitionKeyType] 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. + * + * + * @param {string} [options.partitionKeyValue] Partition key. This is required + * if the partition scheme for the service is Int64Range or Named. + * + * @param {string} [options.previousRspVersion] The value in the Version field + * of the response that was received previously. This is required if the user + * knows that the result that was got previously is stale. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - rollbackClusterUpgradeWithHttpOperationResponse(options) { + resolveServiceWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._rollbackClusterUpgrade(options, (err, result, request, response) => { + self._resolveService(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27468,16 +50597,47 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Rollback the upgrade of a Service Fabric cluster. + * @summary Resolve a Service Fabric partition. + * + * Resolve a Service Fabric service partition to get the endpoints of the + * service replicas. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * Rollback the upgrade of a Service Fabric cluster. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.partitionKeyType] 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. + * + * + * @param {string} [options.partitionKeyValue] Partition key. This is required + * if the partition scheme for the service is Int64Range or Named. + * + * @param {string} [options.previousRspVersion] The value in the Version field + * of the response that was received previously. This is required if the user + * knows that the result that was got previously is stale. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27489,7 +50649,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ResolvedServicePartition} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27497,13 +50657,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResolvedServicePartition} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - rollbackClusterUpgrade(options, optionalCallback) { + resolveService(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27512,49 +50674,62 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._rollbackClusterUpgrade(options, (err, result, request, response) => { + self._resolveService(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._rollbackClusterUpgrade(options, optionalCallback); + return self._resolveService(serviceId, options, optionalCallback); } } /** - * @summary Make the cluster upgrade move on to the next upgrade domain. + * @summary Gets the list of partitions of a Service Fabric service. * - * Make the cluster upgrade move on to the next upgrade domain. + * 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 {object} resumeClusterUpgradeDescription Describes the parameters for - * resuming a cluster upgrade. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next - * upgrade domain for this cluster upgrade. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resumeClusterUpgradeWithHttpOperationResponse(resumeClusterUpgradeDescription, options) { + getPartitionInfoListWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27565,22 +50740,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Make the cluster upgrade move on to the next upgrade domain. + * @summary Gets the list of partitions of a Service Fabric service. * - * Make the cluster upgrade move on to the next upgrade domain. + * 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 {object} resumeClusterUpgradeDescription Describes the parameters for - * resuming a cluster upgrade. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} resumeClusterUpgradeDescription.upgradeDomain The next - * upgrade domain for this cluster upgrade. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27592,7 +50780,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedServicePartitionInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27600,179 +50788,64 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._resumeClusterUpgrade(resumeClusterUpgradeDescription, options, optionalCallback); - } - } - - /** - * @summary 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 {object} startClusterUpgradeDescription Describes the parameters for - * starting a cluster upgrade. - * - * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster - * code version. - * - * @param {string} [startClusterUpgradeDescription.configVersion] The cluster - * configuration version. - * - * @param {string} [startClusterUpgradeDescription.upgradeKind] Possible values - * include: 'Invalid', 'Rolling' - * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' - * - * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * - * @param {boolean} [startClusterUpgradeDescription.forceRestart] - * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] - * - * @param {boolean} - * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. - * - * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. - * - * - * @param {array} - * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * - * @param {boolean} - * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. - * - * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedServicePartitionInfoList} for more + * information. * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * 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%. + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * 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%. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionInfoList(serviceId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getPartitionInfoList(serviceId, options, optionalCallback); + } + } + + /** + * @summary Gets the information about a Service Fabric partition. * - * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * 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 {array} - * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startClusterUpgradeWithHttpOperationResponse(startClusterUpgradeDescription, options) { + getPartitionInfoWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionInfo(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -27783,137 +50856,118 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {object} startClusterUpgradeDescription Describes the parameters for - * starting a cluster upgrade. - * - * @param {string} [startClusterUpgradeDescription.codeVersion] The cluster - * code version. - * - * @param {string} [startClusterUpgradeDescription.configVersion] The cluster - * configuration version. - * - * @param {string} [startClusterUpgradeDescription.upgradeKind] Possible values - * include: 'Invalid', 'Rolling' - * - * @param {string} [startClusterUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @summary Gets the information about a Service Fabric partition. * - * @param {number} - * [startClusterUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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 {boolean} [startClusterUpgradeDescription.forceRestart] + * @param {uuid} partitionId The identity of the partition. * - * @param {object} [startClusterUpgradeDescription.monitoringPolicy] + * @param {object} [options] Optional Parameters. * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * {Promise} A promise is returned * - * @param {string} - * [startClusterUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * @resolve {ServicePartitionInfo} - The deserialized result object. * - * @param {object} [startClusterUpgradeDescription.clusterHealthPolicy] + * @reject {Error} - The error object. * - * @param {boolean} - * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * {Error} err - The Error object if an error occurred, null otherwise. * - * 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServicePartitionInfo} for more information. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * {object} [request] - The HTTP Request object if an error did not occur. * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionInfo(partitionId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getPartitionInfo(partitionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getPartitionInfo(partitionId, options, optionalCallback); + } + } + + /** + * @summary Gets the name of the Service Fabric service for a partition. * - * @param {number} - * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * Gets name of the service for the specified partition. A 404 error is + * returned if the partition ID does not exist in the cluster. * - * 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. + * @param {uuid} partitionId The identity of the partition. * + * @param {object} [options] Optional Parameters. * - * @param {array} - * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {boolean} - * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, - * enables delta health evaluation rather than absolute health evaluation after - * completion of each upgrade domain. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [startClusterUpgradeDescription.clusterUpgradeHealthPolicy] + * @returns {Promise} A promise is returned * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * 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%. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} - * [startClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * 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%. + * @reject {Error} - The error object. + */ + getServiceNameInfoWithHttpOperationResponse(partitionId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the name of the Service Fabric service for a partition. * - * @param {object} [startClusterUpgradeDescription.applicationHealthPolicyMap] + * 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 {array} - * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27925,7 +50979,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ServiceNameInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -27933,13 +50987,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ServiceNameInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback) { + getServiceNameInfo(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -27948,93 +51003,107 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startClusterUpgrade(startClusterUpgradeDescription, options, (err, result, request, response) => { + self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startClusterUpgrade(startClusterUpgradeDescription, options, optionalCallback); + return self._getServiceNameInfo(partitionId, options, optionalCallback); } } /** - * @summary 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. + * @summary Gets the health of the specified Service Fabric partition. * - * @param {object} clusterConfigurationUpgradeDescription Parameters for a - * standalone cluster configuration upgrade. + * Gets the health information of the specified partition. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the service based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. + * If you specify a partition that does not exist in the health store, this + * request returns an error. * - * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or - * cluster is not healthy. + * @param {uuid} partitionId The identity of the partition. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] - * The length of time to wait after completing an upgrade domain before - * starting the health checks process. + * @param {object} [options] Optional Parameters. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The - * timeout for the upgrade domain. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade - * timeout. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications during the upgrade. - * Allowed values are integer values from zero to 100. + * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed - * values are integer values from zero to 100. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The - * maximum allowed percentage of delta health degradation during the upgrade. - * Allowed values are integer values from zero to 100. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain delta health degradation - * during the upgrade. Allowed values are integer values from zero to 100. + * @param {boolean} [options.excludeHealthStatistics] 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startClusterConfigurationUpgradeWithHttpOperationResponse(clusterConfigurationUpgradeDescription, options) { + getPartitionHealthWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionHealth(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28045,66 +51114,80 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary Gets the health of the specified Service Fabric partition. * - * @param {object} clusterConfigurationUpgradeDescription Parameters for a - * standalone cluster configuration upgrade. + * Gets the health information of the specified partition. + * Use EventsHealthStateFilter to filter the collection of health events + * reported on the service based on the health state. + * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState + * objects on the partition. + * If you specify a partition that does not exist in the health store, this + * request returns an error. * - * @param {string} clusterConfigurationUpgradeDescription.clusterConfig The - * cluster configuration. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckRetryTimeout] The length - * of time between attempts to perform a health checks if the application or - * cluster is not healthy. + * @param {uuid} partitionId The identity of the partition. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckWaitDurationInSeconds] - * The length of time to wait after completing an upgrade domain before - * starting the health checks process. + * @param {object} [options] Optional Parameters. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.healthCheckStableDurationInSeconds] - * The length of time that the application or cluster must remain healthy. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeDomainTimeoutInSeconds] The - * timeout for the upgrade domain. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {moment.duration} - * [clusterConfigurationUpgradeDescription.upgradeTimeoutInSeconds] The upgrade - * timeout. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyApplications] The - * maximum allowed percentage of unhealthy applications during the upgrade. - * Allowed values are integer values from zero to 100. + * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUnhealthyNodes] The - * maximum allowed percentage of unhealthy nodes during the upgrade. Allowed - * values are integer values from zero to 100. + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentDeltaUnhealthyNodes] The - * maximum allowed percentage of delta health degradation during the upgrade. - * Allowed values are integer values from zero to 100. * - * @param {number} - * [clusterConfigurationUpgradeDescription.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * The maximum allowed percentage of upgrade domain delta health degradation - * during the upgrade. Allowed values are integer values from zero to 100. + * @param {boolean} [options.excludeHealthStatistics] 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28116,7 +51199,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28124,13 +51207,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback) { + getPartitionHealth(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28139,155 +51223,192 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionHealth(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescription, options, optionalCallback); + return self._getPartitionHealth(partitionId, options, optionalCallback); } } /** - * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * @param {object} updateClusterUpgradeDescription Parameters for updating a - * cluster upgrade. + * @summary Gets the health of the specified Service Fabric partition, by using + * the specified health policy. * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] Possible - * values include: 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * 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 {object} [updateClusterUpgradeDescription.updateDescription] * - * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] + * @param {object} [options] Optional Parameters. * - * @param {number} - * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * @param {object} [options.applicationHealthPolicy] 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. * - * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] * - * @param {boolean} - * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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 applications - * that can be unhealthy before the cluster is considered in error. + * 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 - * 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. + * 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 - * applications. Default percentage is zero. + * partitions. Default percentage is zero. * * - * @param {array} - * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] + * 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. * - * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] * * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * 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%. + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum maximum allowed percentage of unhealthy services. Allowed values + * are Byte values from zero to 100. * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * 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%. + * 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. * - * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] * - * @param {array} - * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateClusterUpgradeWithHttpOperationResponse(updateClusterUpgradeDescription, options) { + getPartitionHealthUsingPolicyWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28298,128 +51419,165 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * Update the upgrade parameters of a Service Fabric cluster upgrade. - * - * @param {object} updateClusterUpgradeDescription Parameters for updating a - * cluster upgrade. + * @summary Gets the health of the specified Service Fabric partition, by using + * the specified health policy. * - * @param {string} [updateClusterUpgradeDescription.upgradeKind] Possible - * values include: 'Invalid', 'Rolling', 'Rolling_ForceRestart' + * 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 {object} [updateClusterUpgradeDescription.updateDescription] * - * @param {string} - * updateClusterUpgradeDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} - * [updateClusterUpgradeDescription.updateDescription.forceRestart] + * @param {object} [options] Optional Parameters. * - * @param {number} - * [updateClusterUpgradeDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckStableDurationInMilliseconds] + * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. + * For example, If the provided value is 6 then all of the events with + * HealthState value of OK (2) and Warning (4) will be returned. The possible + * values for this parameter include integer value of one of the following + * health states. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeTimeoutInMilliseconds] * - * @param {string} - * [updateClusterUpgradeDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] + * @param {object} [options.applicationHealthPolicy] 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. * - * @param {object} [updateClusterUpgradeDescription.clusterHealthPolicy] * - * @param {boolean} - * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyNodes] - * 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. + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} - * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] - * 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. + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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 applications - * that can be unhealthy before the cluster is considered in error. + * 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 - * 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. + * 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 - * applications. Default percentage is zero. + * partitions. Default percentage is zero. * * - * @param {array} - * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {boolean} - * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] + * 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. * - * @param {object} [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy] * * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentDeltaUnhealthyNodes] - * 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%. + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum maximum allowed percentage of unhealthy services. Allowed values + * are Byte values from zero to 100. * - * @param {number} - * [updateClusterUpgradeDescription.clusterUpgradeHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes] - * 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%. + * 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. * - * @param {object} [updateClusterUpgradeDescription.applicationHealthPolicyMap] * - * @param {array} - * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. + * + * @param {boolean} [options.excludeHealthStatistics] 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28431,7 +51589,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28439,13 +51597,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback) { + getPartitionHealthUsingPolicy(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28454,49 +51613,153 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateClusterUpgrade(updateClusterUpgradeDescription, options, (err, result, request, response) => { + self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateClusterUpgrade(updateClusterUpgradeDescription, options, optionalCallback); + return self._getPartitionHealthUsingPolicy(partitionId, options, optionalCallback); } } /** - * @summary Gets the Azure Active Directory metadata used for secured - * connection to cluster. + * @summary Sends a health report on the Service Fabric partition. * - * 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. + * 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 {uuid} partitionId The identity of the partition. + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag which 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getAadMetadataWithHttpOperationResponse(options) { + reportPartitionHealthWithHttpOperationResponse(partitionId, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getAadMetadata(options, (err, result, request, response) => { + self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28507,22 +51770,126 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the Azure Active Directory metadata used for secured - * connection to cluster. + * @summary Sends a health report on the Service Fabric partition. * - * 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. + * 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 {uuid} partitionId The identity of the partition. + * + * @param {object} healthInformation 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. + * + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. + * + * + * @param {string} healthInformation.property 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. + * + * + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' + * + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. + * + * + * @param {string} [healthInformation.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. + * + * + * @param {string} [healthInformation.sequenceNumber] 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. + * + * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.immediate] A flag which 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. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28534,7 +51901,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {AadMetadataObject} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28542,14 +51909,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AadMetadataObject} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getAadMetadata(options, optionalCallback) { + reportPartitionHealth(partitionId, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28558,77 +51924,50 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getAadMetadata(options, (err, result, request, response) => { + self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getAadMetadata(options, optionalCallback); + return self._reportPartitionHealth(partitionId, healthInformation, options, optionalCallback); } } /** - * @summary Gets the list of nodes in the Service Fabric cluster. - * - * The Nodes endpoint returns information about the nodes in the Service Fabric - * Cluster. The respons include the name, status, id, health, uptime and other - * details about the node. + * @summary Gets the load information of the specified Service Fabric + * partition. * - * @param {object} [options] Optional Parameters. + * 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 {string} [options.continuationToken] 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. * - * @param {string} [options.nodeStatusFilter] 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. + * @param {uuid} partitionId The identity of the partition. * - * - default - This filter value will match all of the nodes excepts the ones - * with with status as Unknown or Removed. - * - all - This filter value will match all of the nodes. - * - up - This filter value will match nodes that are Up. - * - down - This filter value will match nodes that are Down. - * - enabling - This filter value will match nodes that are in the process of - * being enabled with status as Enabling. - * - disabling - This filter value will match nodes that are in the process of - * being disabled with status as Disabling. - * - disabled - This filter value will match nodes that are Disabled. - * - 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 - This filter value will match nodes whose status is Removed. - * These are the nodes that are removed from the cluster using the - * RemoveNodeState API. - * . Possible values include: 'default', 'all', 'up', 'down', 'enabling', - * 'disabling', 'disabled', 'unknown', 'removed' + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeInfoListWithHttpOperationResponse(options) { + getPartitionLoadInformationWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeInfoList(options, (err, result, request, response) => { + self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28639,50 +51978,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of nodes in the Service Fabric cluster. - * - * The Nodes endpoint returns information about the nodes in the Service Fabric - * Cluster. The respons include the name, status, id, health, uptime and other - * details about the node. + * @summary Gets the load information of the specified Service Fabric + * partition. * - * @param {object} [options] Optional Parameters. + * 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 {string} [options.continuationToken] 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. * - * @param {string} [options.nodeStatusFilter] 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. + * @param {uuid} partitionId The identity of the partition. * - * - default - This filter value will match all of the nodes excepts the ones - * with with status as Unknown or Removed. - * - all - This filter value will match all of the nodes. - * - up - This filter value will match nodes that are Up. - * - down - This filter value will match nodes that are Down. - * - enabling - This filter value will match nodes that are in the process of - * being enabled with status as Enabling. - * - disabling - This filter value will match nodes that are in the process of - * being disabled with status as Disabling. - * - disabled - This filter value will match nodes that are Disabled. - * - 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 - This filter value will match nodes whose status is Removed. - * These are the nodes that are removed from the cluster using the - * RemoveNodeState API. - * . Possible values include: 'default', 'all', 'up', 'down', 'enabling', - * 'disabling', 'disabled', 'unknown', 'removed' + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28694,7 +52006,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedNodeInfoList} - The deserialized result object. + * @resolve {PartitionLoadInformation} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28703,13 +52015,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedNodeInfoList} for more information. + * See {@link PartitionLoadInformation} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeInfoList(options, optionalCallback) { + getPartitionLoadInformation(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28718,47 +52031,46 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeInfoList(options, (err, result, request, response) => { + self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeInfoList(options, optionalCallback); + return self._getPartitionLoadInformation(partitionId, options, optionalCallback); } } /** - * @summary Gets the list of nodes in the Service Fabric cluster. + * @summary Resets the current load of a Service Fabric partition. * - * Gets the information about a specific node in the Service Fabric Cluster.The - * respons include the name, status, id, health, uptime and other details about - * the node. + * Resets the current load of a Service Fabric partition to the default load + * for the service. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeInfoWithHttpOperationResponse(nodeName, options) { + resetPartitionLoadWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeInfo(nodeName, options, (err, result, request, response) => { + self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28769,20 +52081,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of nodes in the Service Fabric cluster. + * @summary Resets the current load of a Service Fabric partition. * - * Gets the information about a specific node in the Service Fabric Cluster.The - * respons include the name, status, id, health, uptime and other details about - * the node. + * Resets the current load of a Service Fabric partition to the default load + * for the service. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28794,7 +52105,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28802,14 +52113,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeInfo(nodeName, options, optionalCallback) { + resetPartitionLoad(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28818,72 +52128,50 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeInfo(nodeName, options, (err, result, request, response) => { + self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeInfo(nodeName, options, optionalCallback); + return self._resetPartitionLoad(partitionId, options, optionalCallback); } } /** - * @summary Gets the health of a Service Fabric node. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover a specific partition which is currently stuck in quorum loss. * - * 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. + * Indicates to the Service Fabric cluster that it should attempt to recover a + * specific partition which is currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeHealthWithHttpOperationResponse(nodeName, options) { + recoverPartitionWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeHealth(nodeName, options, (err, result, request, response) => { + self._recoverPartition(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -28894,45 +52182,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric node. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover a specific partition which is currently stuck in quorum loss. * - * 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. + * Indicates to the Service Fabric cluster that it should attempt to recover a + * specific partition which is currently stuck in quorum loss. This operation + * should only be performed if it is known that the replicas that are down + * cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -28944,7 +52210,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -28952,14 +52218,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeHealth(nodeName, options, optionalCallback) { + recoverPartition(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -28968,119 +52233,57 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeHealth(nodeName, options, (err, result, request, response) => { + self._recoverPartition(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeHealth(nodeName, options, optionalCallback); + return self._recoverPartition(partitionId, options, optionalCallback); } } /** - * @summary 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 {string} nodeName The name of the node. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {object} [options.clusterHealthPolicy] 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. - * - * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. - * + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the specified service which is currently stuck in quorum loss. * - * @param {number} - * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the specified service which is currently stuck in quorum loss. This + * operation should only be performed if it is known that the replicas that are + * down cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * 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. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * * - * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeHealthUsingPolicyWithHttpOperationResponse(nodeName, options) { + recoverServicePartitionsWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29091,92 +52294,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} nodeName The name of the node. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {object} [options.clusterHealthPolicy] 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. - * - * @param {boolean} [options.clusterHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} [options.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. - * + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the specified service which is currently stuck in quorum loss. * - * @param {number} - * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the specified service which is currently stuck in quorum loss. This + * operation should only be performed if it is known that the replicas that are + * down cannot be recovered. Incorrect use of this API can cause potential data + * loss. * - * 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. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * * - * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29188,7 +52329,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -29196,14 +52337,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeHealthUsingPolicy(nodeName, options, optionalCallback) { + recoverServicePartitions(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29212,135 +52352,33 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeHealthUsingPolicy(nodeName, options, (err, result, request, response) => { + self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeHealthUsingPolicy(nodeName, options, optionalCallback); + return self._recoverServicePartitions(serviceId, options, optionalCallback); } } /** - * @summary 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 {string} nodeName The name of the node. - * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. - * - * - * @param {string} [healthInformation.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. - * - * - * @param {string} [healthInformation.sequenceNumber] 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. - * - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. - * - * - * @param {object} [options] Optional Parameters. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the system services which are currently stuck in quorum loss. * - * @param {boolean} [options.immediate] A flag which 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. + * Indicates to the Service Fabric cluster that it should attempt to recover + * the 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29351,11 +52389,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportNodeHealthWithHttpOperationResponse(nodeName, healthInformation, options) { + recoverSystemPartitionsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + self._recoverSystemPartitions(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29366,123 +52404,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} nodeName The name of the node. - * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. - * - * - * @param {string} [healthInformation.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. - * - * - * @param {string} [healthInformation.sequenceNumber] 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. - * - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover the system services which are currently stuck in quorum loss. * + * Indicates to the Service Fabric cluster that it should attempt to recover + * the system services which are currently stuck in quorum loss. 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 {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29508,7 +52444,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportNodeHealth(nodeName, healthInformation, options, optionalCallback) { + recoverSystemPartitions(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29517,45 +52453,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportNodeHealth(nodeName, healthInformation, options, (err, result, request, response) => { + self._recoverSystemPartitions(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportNodeHealth(nodeName, healthInformation, options, optionalCallback); + return self._recoverSystemPartitions(options, optionalCallback); } } /** - * @summary Gets the load information of a Service Fabric node. - * - * Gets the load information of a Service Fabric node. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover any services (including system services) which are currently stuck + * in quorum loss. * - * @param {string} nodeName The name of the node. + * 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeLoadInfoWithHttpOperationResponse(nodeName, options) { + recoverAllPartitionsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + self._recoverAllPartitions(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29566,18 +52506,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the load information of a Service Fabric node. - * - * Gets the load information of a Service Fabric node. + * @summary Indicates to the Service Fabric cluster that it should attempt to + * recover any services (including system services) which are currently stuck + * in quorum loss. * - * @param {string} nodeName The name of the node. + * 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29589,7 +52533,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeLoadInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -29597,14 +52541,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeLoadInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeLoadInfo(nodeName, options, optionalCallback) { + recoverAllPartitions(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29613,67 +52556,186 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeLoadInfo(nodeName, options, (err, result, request, response) => { + self._recoverAllPartitions(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeLoadInfo(nodeName, options, optionalCallback); + return self._recoverAllPartitions(options, optionalCallback); } } /** - * @summary Deactivate a Service Fabric cluster node with the specified - * deactivation intent. + * @summary Creates a new repair task. * - * Deactivate a Service Fabric cluster node with the specified deactivation - * intent. Once the deactivation is in progress, the deactivation intent can be - * increased, but not decreased (for example, a node which is was deactivated - * with the Pause intent can be deactivated further with Restart, but not the - * other way around. Nodes may be reactivated using the Activate a node - * operation any time after they are deactivated. If the deactivation is not - * complete this will cancel the deactivation. A node which goes down and comes - * back up while deactivated will still need to be reactivated before services - * will be placed on that node. + * 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. * - * @param {string} nodeName The name of the node. + * 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. * - * @param {object} deactivationIntentDescription Describes the intent or reason - * for deactivating the node. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} [deactivationIntentDescription.deactivationIntent] Describes - * the intent or reason for deactivating the node. The possible values are - * following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' * - * @param {object} [options] Optional Parameters. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} repairTask.taskId The ID of the repair task. + * + * @param {string} [repairTask.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. + * + * + * @param {string} [repairTask.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. + * + * + * @param {string} repairTask.state 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' + * + * @param {number} [repairTask.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 + * + * + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. + * + * + * @param {object} [repairTask.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. + * + * + * @param {string} repairTask.target.kind Polymorphic Discriminator + * + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. + * + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. + * + * @param {object} [repairTask.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. + * + * + * @param {string} repairTask.impact.kind Polymorphic Discriminator + * + * @param {string} [repairTask.resultStatus] 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' + * + * @param {number} [repairTask.resultCode] 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. + * + * + * @param {string} [repairTask.resultDetails] 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. + * + * + * @param {object} [repairTask.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. + * + * + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. + * + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. + * + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state + * + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. + * + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. + * + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. + * + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. + * + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. + * + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - disableNodeWithHttpOperationResponse(nodeName, deactivationIntentDescription, options) { + createRepairTaskWithHttpOperationResponse(repairTask, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + self._createRepairTask(repairTask, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29684,40 +52746,159 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deactivate a Service Fabric cluster node with the specified - * deactivation intent. + * @summary Creates a new repair task. * - * Deactivate a Service Fabric cluster node with the specified deactivation - * intent. Once the deactivation is in progress, the deactivation intent can be - * increased, but not decreased (for example, a node which is was deactivated - * with the Pause intent can be deactivated further with Restart, but not the - * other way around. Nodes may be reactivated using the Activate a node - * operation any time after they are deactivated. If the deactivation is not - * complete this will cancel the deactivation. A node which goes down and comes - * back up while deactivated will still need to be reactivated before services - * will be placed on that node. + * 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. * - * @param {string} nodeName The name of the node. + * 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. * - * @param {object} deactivationIntentDescription Describes the intent or reason - * for deactivating the node. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} [deactivationIntentDescription.deactivationIntent] Describes - * the intent or reason for deactivating the node. The possible values are - * following. - * - Pause - Indicates that the node should be paused. The value is 1. - * - Restart - Indicates that the intent is for the node to be restarted after - * a short period of time. The value is 2. - * - RemoveData - Indicates the intent is for the node to remove data. The - * value is 3. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' * - * @param {object} [options] Optional Parameters. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} repairTask.taskId The ID of the repair task. + * + * @param {string} [repairTask.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. + * + * + * @param {string} [repairTask.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. + * + * + * @param {string} repairTask.state 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' + * + * @param {number} [repairTask.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 + * + * + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. + * + * + * @param {object} [repairTask.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. + * + * + * @param {string} repairTask.target.kind Polymorphic Discriminator + * + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. + * + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. + * + * @param {object} [repairTask.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. + * + * + * @param {string} repairTask.impact.kind Polymorphic Discriminator + * + * @param {string} [repairTask.resultStatus] 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' + * + * @param {number} [repairTask.resultCode] 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. + * + * + * @param {string} [repairTask.resultDetails] 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. + * + * + * @param {object} [repairTask.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. + * + * + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. + * + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. + * + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state + * + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. + * + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. + * + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. + * + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. + * + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. + * + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29729,7 +52910,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -29737,13 +52918,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - disableNode(nodeName, deactivationIntentDescription, options, optionalCallback) { + createRepairTask(repairTask, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29752,49 +52934,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._disableNode(nodeName, deactivationIntentDescription, options, (err, result, request, response) => { + self._createRepairTask(repairTask, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._disableNode(nodeName, deactivationIntentDescription, options, optionalCallback); + return self._createRepairTask(repairTask, options, optionalCallback); } } /** - * @summary Activate a Service Fabric cluster node which is currently - * deactivated. + * @summary Requests the cancellation of the given repair task. * - * Activates a Service Fabric cluster node which 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskCancelDescription Describes the repair task to be + * cancelled. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} repairTaskCancelDescription.taskId The ID of the repair + * task. + * + * @param {string} [repairTaskCancelDescription.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. + * + * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - enableNodeWithHttpOperationResponse(nodeName, options) { + cancelRepairTaskWithHttpOperationResponse(repairTaskCancelDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._enableNode(nodeName, options, (err, result, request, response) => { + self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29805,23 +52994,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Activate a Service Fabric cluster node which is currently - * deactivated. + * @summary Requests the cancellation of the given repair task. * - * Activates a Service Fabric cluster node which 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. + * + * + * @param {object} repairTaskCancelDescription Describes the repair task to be + * cancelled. + * + * @param {string} repairTaskCancelDescription.taskId The ID of the repair + * task. + * + * @param {string} [repairTaskCancelDescription.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. * - * @param {string} nodeName The name of the node. + * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -29832,7 +53028,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -29840,13 +53036,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - enableNode(nodeName, options, optionalCallback) { + cancelRepairTask(repairTaskCancelDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29855,39 +53052,36 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._enableNode(nodeName, options, (err, result, request, response) => { + self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._enableNode(nodeName, options, optionalCallback); + return self._cancelRepairTask(repairTaskCancelDescription, options, optionalCallback); } } /** - * @summary Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. + * @summary Deletes a completed repair task. * - * Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. This implies that it is not possible to - * recover the persisted state of that node. This generally happens if a hard - * disk has been wiped clean, or if a hard disk crashes. The node has to be - * down for this operation to be successful. This operation lets Service Fabric - * know that the replicas on that node no longer exist, and that Service Fabric - * should stop waiting for those replicas to come back up. Do not run this - * cmdlet if the state on the node has not been removed and the node can comes - * back up with its state intact. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskDeleteDescription Describes the repair task to be + * deleted. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} repairTaskDeleteDescription.taskId The ID of the completed + * repair task to be deleted. + * + * @param {string} [repairTaskDeleteDescription.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. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29898,11 +53092,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - removeNodeStateWithHttpOperationResponse(nodeName, options) { + deleteRepairTaskWithHttpOperationResponse(repairTaskDeleteDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeNodeState(nodeName, options, (err, result, request, response) => { + self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -29913,27 +53107,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. + * @summary Deletes a completed repair task. * - * Notifies Service Fabric that the persisted state on a node has been - * permanently removed or lost. This implies that it is not possible to - * recover the persisted state of that node. This generally happens if a hard - * disk has been wiped clean, or if a hard disk crashes. The node has to be - * down for this operation to be successful. This operation lets Service Fabric - * know that the replicas on that node no longer exist, and that Service Fabric - * should stop waiting for those replicas to come back up. Do not run this - * cmdlet if the state on the node has not been removed and the node can comes - * back up with its state intact. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskDeleteDescription Describes the repair task to be + * deleted. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} repairTaskDeleteDescription.taskId The ID of the completed + * repair task to be deleted. + * + * @param {string} [repairTaskDeleteDescription.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. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -29959,7 +53150,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeNodeState(nodeName, options, optionalCallback) { + deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -29968,57 +53159,57 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeNodeState(nodeName, options, (err, result, request, response) => { + self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeNodeState(nodeName, options, optionalCallback); + return self._deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback); } } /** - * @summary Restarts a Service Fabric cluster node. + * @summary Gets a list of repair tasks matching the given filters. * - * Restarts a Service Fabric cluster node that is already started. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. * - * @param {object} restartNodeDescription The instance of the node to be - * restarted and a flag indicating the need to take dump of the fabric process. + * @param {object} [options] Optional Parameters. * - * @param {string} restartNodeDescription.nodeInstanceId 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 {string} [options.taskIdFilter] The repair task ID prefix to be + * matched. * - * @param {string} [restartNodeDescription.createFabricDump] Specify True to - * create a dump of the fabric node process. This is case sensitive. Possible - * values include: 'False', 'True' + * @param {number} [options.stateFilter] 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 * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} [options.executorFilter] The name of the repair executor + * whose claimed tasks should be included in the list. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restartNodeWithHttpOperationResponse(nodeName, restartNodeDescription, options) { + getRepairTaskListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + self._getRepairTaskList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30029,30 +53220,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Restarts a Service Fabric cluster node. + * @summary Gets a list of repair tasks matching the given filters. * - * Restarts a Service Fabric cluster node that is already started. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} nodeName The name of the node. * - * @param {object} restartNodeDescription The instance of the node to be - * restarted and a flag indicating the need to take dump of the fabric process. + * @param {object} [options] Optional Parameters. * - * @param {string} restartNodeDescription.nodeInstanceId 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 {string} [options.taskIdFilter] The repair task ID prefix to be + * matched. * - * @param {string} [restartNodeDescription.createFabricDump] Specify True to - * create a dump of the fabric node process. This is case sensitive. Possible - * values include: 'False', 'True' + * @param {number} [options.stateFilter] 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 * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} [options.executorFilter] The name of the repair executor + * whose claimed tasks should be included in the list. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30064,7 +53255,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30072,13 +53263,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartNode(nodeName, restartNodeDescription, options, optionalCallback) { + getRepairTaskList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30087,86 +53278,51 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartNode(nodeName, restartNodeDescription, options, (err, result, request, response) => { + self._getRepairTaskList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartNode(nodeName, restartNodeDescription, options, optionalCallback); + return self._getRepairTaskList(options, optionalCallback); } } /** - * @summary 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 3 application - * types, or if max results is set to 3, then 3 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 {object} [options] Optional Parameters. + * @summary Forces the approval of the given repair task. * - * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind for application type query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationTypeDefinitionKind value. 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {object} repairTaskApproveDescription Describes the repair task to be + * approved. * - * @param {string} [options.continuationToken] 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. + * @param {string} repairTaskApproveDescription.taskId The ID of the repair + * task. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {string} [repairTaskApproveDescription.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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationTypeInfoListWithHttpOperationResponse(options) { + forceApproveRepairTaskWithHttpOperationResponse(repairTaskApproveDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationTypeInfoList(options, (err, result, request, response) => { + self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30177,59 +53333,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 3 application - * types, or if max results is set to 3, then 3 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 {object} [options] Optional Parameters. + * @summary Forces the approval of the given repair task. * - * @param {number} [options.applicationTypeDefinitionKindFilter] Used to filter - * on ApplicationTypeDefinitionKind for application type query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationTypeDefinitionKind value. 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {object} repairTaskApproveDescription Describes the repair task to be + * approved. * - * @param {string} [options.continuationToken] 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. + * @param {string} repairTaskApproveDescription.taskId The ID of the repair + * task. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {string} [repairTaskApproveDescription.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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30241,7 +53362,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30250,14 +53371,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationTypeInfoList} for more - * information. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationTypeInfoList(options, optionalCallback) { + forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30266,79 +53386,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationTypeInfoList(options, (err, result, request, response) => { + self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationTypeInfoList(options, optionalCallback); + return self._forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback); } } /** - * @summary Gets the list of application types in the Service Fabric cluster - * matching exactly the specified name. + * @summary Updates the health policy of the given repair task. * - * 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 3 application - * types, or if max results is set to 3, then 3 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} applicationTypeName The name of the application type. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair + * task healthy policy to be updated. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the + * repair task to be updated. * - * @param {string} [options.continuationToken] 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. + * @param {string} [repairTaskUpdateHealthPolicyDescription.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. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] 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. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationTypeInfoListByNameWithHttpOperationResponse(applicationTypeName, options) { + updateRepairTaskHealthPolicyWithHttpOperationResponse(repairTaskUpdateHealthPolicyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30349,52 +53453,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of application types in the Service Fabric cluster - * matching exactly the specified name. + * @summary Updates the health policy of the given repair task. * - * 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 3 application - * types, or if max results is set to 3, then 3 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. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} applicationTypeName The name of the application type. * - * @param {object} [options] Optional Parameters. + * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair + * task healthy policy to be updated. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the + * repair task to be updated. * - * @param {string} [options.continuationToken] 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. + * @param {string} [repairTaskUpdateHealthPolicyDescription.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. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} + * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] 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. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30406,7 +53494,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationTypeInfoList} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30415,14 +53503,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationTypeInfoList} for more - * information. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback) { + updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30431,164 +53518,172 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationTypeInfoListByName(applicationTypeName, options, (err, result, request, response) => { + self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationTypeInfoListByName(applicationTypeName, options, optionalCallback); + return self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback); } } /** - * @summary Provisions or registers a Service Fabric application type with the - * cluster. + * @summary Updates the execution state of a repair task. * - * Provisions or registers a Service Fabric application type with the cluster. - * This is required before any new applications can be instantiated. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {object} applicationTypeImageStorePath The relative path for the - * application package in the image store specified during the prior copy - * operation. * - * @param {string} applicationTypeImageStorePath.applicationTypeBuildPath The - * relative image store path to the application package. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {object} [options] Optional Parameters. + * @param {string} repairTask.taskId The ID of the repair task. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} [repairTask.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. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request * - * @returns {Promise} A promise is returned + * @param {string} [repairTask.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. * - * @resolve {HttpOperationResponse} - The deserialized result object. * - * @reject {Error} - The error object. - */ - provisionApplicationTypeWithHttpOperationResponse(applicationTypeImageStorePath, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._provisionApplicationType(applicationTypeImageStorePath, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Provisions or registers a Service Fabric application type with the - * cluster. + * @param {string} repairTask.state 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' * - * Provisions or registers a Service Fabric application type with the cluster. - * This is required before any new applications can be instantiated. + * @param {number} [repairTask.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 * - * @param {object} applicationTypeImageStorePath The relative path for the - * application package in the image store specified during the prior copy - * operation. * - * @param {string} applicationTypeImageStorePath.applicationTypeBuildPath The - * relative image store path to the application package. + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {object} [repairTask.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. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request * - * @param {function} [optionalCallback] - The optional callback. + * @param {string} repairTask.target.kind Polymorphic Discriminator * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. * - * {Promise} A promise is returned + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. * - * @resolve {null} - The deserialized result object. + * @param {object} [repairTask.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. * - * @reject {Error} - The error object. * - * {function} optionalCallback(err, result, request, response) + * @param {string} repairTask.impact.kind Polymorphic Discriminator + * + * @param {string} [repairTask.resultStatus] 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' + * + * @param {number} [repairTask.resultCode] 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. + * + * + * @param {string} [repairTask.resultDetails] 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. + * + * + * @param {object} [repairTask.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. + * + * + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. + * + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. + * + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - provisionApplicationType(applicationTypeImageStorePath, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._provisionApplicationType(applicationTypeImageStorePath, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._provisionApplicationType(applicationTypeImageStorePath, options, optionalCallback); - } - } - - /** - * @summary Removes or unregisters a Service Fabric application type from the - * cluster. + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. * - * Removes or unregisters a Service Fabric application type from the cluster. - * This operation can only be performed if all application instance of the - * application type has been deleted. Once the application type is - * unregistered, no new application instance can be created for this particular - * application type. + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {string} applicationTypeName The name of the application type. + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' * - * @param {object} applicationTypeImageStoreVersion The version of the - * application type in the image store. + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. * - * @param {string} applicationTypeImageStoreVersion.applicationTypeVersion + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - unprovisionApplicationTypeWithHttpOperationResponse(applicationTypeName, applicationTypeImageStoreVersion, options) { + updateRepairExecutionStateWithHttpOperationResponse(repairTask, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._unprovisionApplicationType(applicationTypeName, applicationTypeImageStoreVersion, options, (err, result, request, response) => { + self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30599,137 +53694,145 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Removes or unregisters a Service Fabric application type from the - * cluster. + * @summary Updates the execution state of a repair task. * - * Removes or unregisters a Service Fabric application type from the cluster. - * This operation can only be performed if all application instance of the - * application type has been deleted. Once the application type is - * unregistered, no new application instance can be created for this particular - * application type. + * This API supports the Service Fabric platform; it is not meant to be used + * directly from your code. * - * @param {string} applicationTypeName The name of the application type. * - * @param {object} applicationTypeImageStoreVersion The version of the - * application type in the image store. + * @param {object} repairTask Describes the repair task to be created or + * updated. * - * @param {string} applicationTypeImageStoreVersion.applicationTypeVersion + * @param {string} repairTask.taskId The ID of the repair task. * - * @param {object} [options] Optional Parameters. + * @param {string} [repairTask.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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [repairTask.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. * - * @param {function} [optionalCallback] - The optional callback. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {string} repairTask.state 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' * - * {Promise} A promise is returned + * @param {number} [repairTask.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 * - * @resolve {null} - The deserialized result object. * - * @reject {Error} - The error object. + * @param {string} repairTask.action The requested repair action. Must be + * specified when the repair task is created, and is immutable once set. * - * {function} optionalCallback(err, result, request, response) * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {object} [repairTask.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. * - * {null} [result] - The deserialized result object if an error did not occur. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {string} repairTask.target.kind Polymorphic Discriminator * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - unprovisionApplicationType(applicationTypeName, applicationTypeImageStoreVersion, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._unprovisionApplicationType(applicationTypeName, applicationTypeImageStoreVersion, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._unprovisionApplicationType(applicationTypeName, applicationTypeImageStoreVersion, options, optionalCallback); - } - } - - /** - * @summary Gets the list containing the information about service types that - * are supported by a provisioned application type in a Service Fabric cluster. + * @param {string} [repairTask.executor] The name of the repair executor. Must + * be specified in Claimed and later states, and is immutable once set. * - * Gets the list containing the information about service types that are - * supported by a provisioned application type in a Service Fabric cluster. The - * response includes the name of the service type, the name and version of the - * service manifest the type is defined in, kind (stateless or stateless) of - * the service type and other information about it. + * @param {string} [repairTask.executorData] A data string that the repair + * executor can use to store its internal state. * - * @param {string} applicationTypeName The name of the application type. + * @param {object} [repairTask.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. * - * @param {string} applicationTypeVersion The version of the application type. * - * @param {object} [options] Optional Parameters. + * @param {string} repairTask.impact.kind Polymorphic Discriminator * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} [repairTask.resultStatus] 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' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} [repairTask.resultCode] 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. * - * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [repairTask.resultDetails] 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. * - * @reject {Error} - The error object. - */ - getServiceTypeInfoListWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary 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 - * response includes the name of the service type, the name and version of the - * service manifest the type is defined in, kind (stateless or stateless) of - * the service type and other information about it. + * @param {object} [repairTask.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. * - * @param {string} applicationTypeName The name of the application type. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {date} [repairTask.history.createdUtcTimestamp] The time when the + * repair task entered the Created state. * - * @param {object} [options] Optional Parameters. + * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the + * repair task entered the Claimed state. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the + * repair task entered the Preparing state. + * + * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the + * repair task entered the Approved state + * + * @param {date} [repairTask.history.executingUtcTimestamp] The time when the + * repair task entered the Executing state + * + * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the + * repair task entered the Restoring state + * + * @param {date} [repairTask.history.completedUtcTimestamp] The time when the + * repair task entered the Completed state + * + * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Preparing state. + * + * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Preparing state. + * + * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The + * time when the repair task started the health check in the Restoring state. + * + * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The + * time when the repair task completed the health check in the Restoring state. + * + * @param {string} [repairTask.preparingHealthCheckState] The workflow state of + * the health check when the repair task is in the Preparing state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {string} [repairTask.restoringHealthCheckState] The workflow state of + * the health check when the repair task is in the Restoring state. Possible + * values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', + * 'TimedOut' + * + * @param {boolean} [repairTask.performPreparingHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Preparing state. + * + * @param {boolean} [repairTask.performRestoringHealthCheck] A value to + * determine if health checks will be performed when the repair task enters the + * Restoring state. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30741,7 +53844,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {RepairTaskUpdateInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30749,13 +53852,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RepairTaskUpdateInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback) { + updateRepairExecutionState(repairTask, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30764,51 +53868,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, options, optionalCallback); + return self._updateRepairExecutionState(repairTask, options, optionalCallback); } } /** - * @summary 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 {string} applicationTypeName The name of the application type. + * @summary Gets the information about replicas of a Service Fabric service + * partition. * - * @param {string} applicationTypeVersion The version of the application type. + * 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 {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, serviceManifestName, options) { + getReplicaInfoListWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30819,24 +53928,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} applicationTypeName The name of the application type. + * @summary Gets the information about replicas of a Service Fabric service + * partition. * - * @param {string} applicationTypeVersion The version of the application type. + * 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 {string} serviceManifestName The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30848,7 +53962,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceTypeManifest} - The deserialized result object. + * @resolve {PagedReplicaInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30857,13 +53971,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceTypeManifest} for more information. + * See {@link PagedReplicaInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback) { + getReplicaInfoList(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30872,61 +53986,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, (err, result, request, response) => { + self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceManifest(applicationTypeName, applicationTypeVersion, serviceManifestName, options, optionalCallback); + return self._getReplicaInfoList(partitionId, options, optionalCallback); } } /** - * @summary Gets the list containing the information about service types from - * the applications deployed on a node in a Service Fabric cluster. + * @summary Gets the information about a replica of a Service Fabric partition. * - * 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. + * The response includes the id, role, status, health, node name, uptime, and + * other details about the replica. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceTypeInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + getReplicaInfoWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -30937,34 +54038,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list containing the information about service types from - * the applications deployed on a node in a Service Fabric cluster. + * @summary Gets the information about a replica of a Service Fabric partition. * - * 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. + * The response includes the id, role, status, health, node name, uptime, and + * other details about the replica. * - * @param {string} nodeName The name of the node. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -30976,7 +54064,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ReplicaInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -30984,13 +54072,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback) { + getReplicaInfo(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -30999,66 +54088,75 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceTypeInfoList(nodeName, applicationId, options, optionalCallback); + return self._getReplicaInfo(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Gets the information about a specified service type of the - * application deployed on a node in a Service Fabric cluster. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance. * - * 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. + * 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 {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {uuid} partitionId The identity of the partition. * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] 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. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceTypeInfoByNameWithHttpOperationResponse(nodeName, applicationId, serviceTypeName, options) { + getReplicaHealthWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -31069,39 +54167,48 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a specified service type of the - * application deployed on a node in a Service Fabric cluster. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance. * - * 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. + * 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 {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {uuid} partitionId The identity of the partition. * - * @param {string} serviceTypeName Specifies the name of a Service Fabric - * service type. + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] 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. + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -31113,7 +54220,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ReplicaHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -31121,13 +54228,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback) { + getReplicaHealth(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -31136,73 +54244,158 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, (err, result, request, response) => { + self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeName, options, optionalCallback); + return self._getReplicaHealth(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Creates a Service Fabric application. + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. + * + * @param {object} [options] Optional Parameters. + * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. * - * Creates a Service Fabric application using the specified description. * - * @param {object} applicationDescription Description for creating an - * application. + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * - * @param {string} applicationDescription.name + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 * - * @param {string} applicationDescription.typeName + * 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. * - * @param {string} applicationDescription.typeVersion * - * @param {array} [applicationDescription.parameterList] + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {object} [applicationDescription.applicationCapacity] + * 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. * - * @param {number} [applicationDescription.applicationCapacity.minimumNodes] - * 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. * - * @param {number} [applicationDescription.applicationCapacity.maximumNodes] - * 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. + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum maximum allowed percentage of unhealthy services. Allowed values + * are Byte values from zero to 100. * - * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] + * 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. * - * @param {object} [options] Optional Parameters. + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createApplicationWithHttpOperationResponse(applicationDescription, options) { + getReplicaHealthUsingPolicyWithHttpOperationResponse(partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createApplication(applicationDescription, options, (err, result, request, response) => { + self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -31213,46 +54406,131 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric application. + * @summary Gets the health of a Service Fabric stateful service replica or + * stateless service instance using the specified policy. * - * Creates a Service Fabric application using the specified description. + * 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 {object} applicationDescription Description for creating an - * application. * - * @param {string} applicationDescription.name + * @param {uuid} partitionId The identity of the partition. + * + * @param {string} replicaId The identifier of the replica. * - * @param {string} applicationDescription.typeName + * @param {object} [options] Optional Parameters. * - * @param {string} applicationDescription.typeVersion + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {array} [applicationDescription.parameterList] + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. * - * @param {object} [applicationDescription.applicationCapacity] * - * @param {number} [applicationDescription.applicationCapacity.minimumNodes] - * 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. + * @param {object} [options.applicationHealthPolicy] 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. * - * @param {number} [applicationDescription.applicationCapacity.maximumNodes] - * 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. * - * @param {array} - * [applicationDescription.applicationCapacity.applicationMetrics] + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. * - * @param {object} [options] Optional Parameters. + * @param {number} + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. + * + * + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -31264,7 +54542,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ReplicaHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -31272,13 +54550,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ReplicaHealth} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createApplication(applicationDescription, options, optionalCallback) { + getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -31287,185 +54566,159 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createApplication(applicationDescription, options, (err, result, request, response) => { + self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createApplication(applicationDescription, options, optionalCallback); + return self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric application. - * - * Deletes an existing Service Fabric application. An application must be - * created before it can be deleted. Deleting an application will delete all - * services that are part of that application. By default Service Fabric will - * try to close service replicas in a graceful manner and then delete the - * service. However if service is having issues closing the replica gracefully, - * the delete operation may take a long time or get stuck. Use the optional - * ForceRemove flag to skip the graceful close sequence and forcefully delete - * the application and all of the its services. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {boolean} [options.forceRemove] 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. + * @summary Sends a health report on the Service Fabric replica. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * 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 {object} [options.customHeaders] Headers that will be added to the - * request * - * @returns {Promise} A promise is returned + * @param {uuid} partitionId The identity of the partition. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} replicaId The identifier of the replica. * - * @reject {Error} - The error object. - */ - deleteApplicationWithHttpOperationResponse(applicationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._deleteApplication(applicationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Deletes an existing Service Fabric application. + * @param {string} replicaHealthReportServiceKind 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' * - * 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 service is having issues closing the replica gracefully, - * the delete operation may take a long time or get stuck. Use the optional - * ForceRemove flag to skip the graceful close sequence and forcefully delete - * the application and all of the its services. + * @param {object} healthInformation 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. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * - * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.forceRemove] 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. + * @param {string} healthInformation.property 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request * - * @param {function} [optionalCallback] - The optional callback. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * {Promise} A promise is returned + * If not specified, time to live defaults to infinite value. * - * @resolve {null} - The deserialized result object. * - * @reject {Error} - The error object. + * @param {string} [healthInformation.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. * - * {function} optionalCallback(err, result, request, response) * - * {Error} err - The Error object if an error occurred, null otherwise. + * @param {string} [healthInformation.sequenceNumber] 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. * - * {null} [result] - The deserialized result object if an error did not occur. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - deleteApplication(applicationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._deleteApplication(applicationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._deleteApplication(applicationId, options, optionalCallback); - } - } - - /** - * @summary 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 app is occupying - * currently, and application load metric information about the application. + * @param {object} [options] Optional Parameters. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {boolean} [options.immediate] A flag which 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationLoadInfoWithHttpOperationResponse(applicationId, options) { + reportReplicaHealthWithHttpOperationResponse(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { + self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -31476,187 +54729,132 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 app is occupying - * currently, and application load metric information about the application. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ApplicationLoadInfo} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) + * @summary Sends a health report on the Service Fabric replica. * - * {Error} err - The Error object if an error occurred, null otherwise. + * 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. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationLoadInfo} for more information. * - * {object} [request] - The HTTP Request object if an error did not occur. + * @param {uuid} partitionId The identity of the partition. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getApplicationLoadInfo(applicationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getApplicationLoadInfo(applicationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getApplicationLoadInfo(applicationId, options, optionalCallback); - } - } - - /** - * @summary Gets the list of applications created in the Service Fabric cluster - * that match filters specified as the parameter. + * @param {string} replicaId The identifier of the replica. * - * Gets the information about the applications that were created or in the - * process of being created in the Service Fabric cluster and match filters - * specified as the parameter. 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. + * @param {string} replicaHealthReportServiceKind 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' * - * @param {object} [options] Optional Parameters. + * @param {object} healthInformation 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. * - * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind for application query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationDefinitionKind value. 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. + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * * - * @param {string} [options.applicationTypeName] The application type name used - * to filter the applications to query for. This value should not contain the - * application type version. + * @param {string} healthInformation.property 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. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * @param {string} [options.continuationToken] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * @returns {Promise} A promise is returned + * If not specified, time to live defaults to infinite value. * - * @resolve {HttpOperationResponse} - The deserialized result object. * - * @reject {Error} - The error object. - */ - getApplicationInfoListWithHttpOperationResponse(options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getApplicationInfoList(options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the list of applications created in the Service Fabric cluster - * that match filters specified as the parameter. + * @param {string} [healthInformation.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. * - * Gets the information about the applications that were created or in the - * process of being created in the Service Fabric cluster and match filters - * specified as the parameter. 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. * - * @param {object} [options] Optional Parameters. + * @param {string} [healthInformation.sequenceNumber] 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. * - * @param {number} [options.applicationDefinitionKindFilter] Used to filter on - * ApplicationDefinitionKind for application query operations. - * - Default - Default value. Filter that matches input with any - * ApplicationDefinitionKind value. 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. * + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * @param {string} [options.applicationTypeName] The application type name used - * to filter the applications to query for. This value should not contain the - * application type version. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {object} [options] Optional Parameters. + * + * @param {boolean} [options.immediate] A flag which 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. * - * @param {string} [options.continuationToken] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -31668,7 +54866,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedApplicationInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -31676,15 +54874,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedApplicationInfoList} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationInfoList(options, optionalCallback) { + reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -31693,56 +54889,64 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationInfoList(options, (err, result, request, response) => { + self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationInfoList(options, optionalCallback); + return self._reportReplicaHealth(partitionId, replicaId, replicaHealthReportServiceKind, healthInformation, options, optionalCallback); } } /** - * @summary Gets information about a Service Fabric application. + * @summary Gets the list of replicas deployed on a Service Fabric node. * - * 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. + * 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {uuid} [options.partitionId] The identity of the partition. + * + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationInfoWithHttpOperationResponse(applicationId, options) { + getDeployedServiceReplicaInfoListWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -31753,29 +54957,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets information about a Service Fabric application. + * @summary Gets the list of replicas deployed on a Service Fabric node. * - * 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. + * 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {boolean} [options.excludeApplicationParameters] The flag that - * specifies whether application parameters will be excluded from the result. + * @param {uuid} [options.partitionId] The identity of the partition. + * + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -31787,7 +54999,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationInfo} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -31795,14 +55007,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationInfo} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationInfo(applicationId, options, optionalCallback) { + getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -31811,133 +55022,52 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationInfo(applicationId, options, (err, result, request, response) => { + self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationInfo(applicationId, options, optionalCallback); + return self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback); } } /** - * @summary 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 helath store, it will return Error. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. - * + * @summary Gets the details of replica deployed on a Service Fabric node. * - * @param {number} [options.servicesHealthStateFilter] 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 value - * 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. + * Gets the details of the replica deployed on a Service Fabric node. The + * information include service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} nodeName The name of the node. * + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {string} replicaId The identifier of the replica. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationHealthWithHttpOperationResponse(applicationId, options) { + getDeployedServiceReplicaDetailInfoWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationHealth(applicationId, options, (err, result, request, response) => { + self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -31948,106 +55078,25 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 helath store, it will return Error. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. - * + * @summary Gets the details of replica deployed on a Service Fabric node. * - * @param {number} [options.servicesHealthStateFilter] 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 value - * 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. + * Gets the details of the replica deployed on a Service Fabric node. The + * information include service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} nodeName The name of the node. * + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {string} replicaId The identifier of the replica. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -32059,7 +55108,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationHealth} - The deserialized result object. + * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -32067,226 +55116,67 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationHealth} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getApplicationHealth(applicationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getApplicationHealth(applicationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getApplicationHealth(applicationId, options, optionalCallback); - } - } - - /** - * @summary 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. - * - * - * @param {number} [options.servicesHealthStateFilter] 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 value - * 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. - * - * - * @param {boolean} [options.excludeHealthStatistics] 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. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedServiceReplicaDetailInfo} for more + * information. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback); + } + } + + /** + * @summary Gets the details of replica deployed on a Service Fabric node. * - * 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. + * Gets the details of the replica deployed on a Service Fabric node. The + * information include service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. + * + * @param {string} nodeName The name of the node. * + * @param {uuid} partitionId The identity of the partition. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationHealthUsingPolicyWithHttpOperationResponse(applicationId, options) { + getDeployedServiceReplicaDetailInfoByPartitionIdWithHttpOperationResponse(nodeName, partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -32297,183 +55187,134 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of a Service Fabric application using the specified - * policy. + * @summary Gets the details of replica deployed on a Service Fabric node. * - * 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. + * Gets the details of the replica deployed on a Service Fabric node. The + * information include service kind, service name, current service operation, + * current service operation start date time, partition ID, replica/instance + * ID, reported load, and other information. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {string} nodeName The name of the node. + * + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @param {function} [optionalCallback] - The optional callback. * - * @param {number} [options.deployedApplicationsHealthStateFilter] 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 value 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. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * {Promise} A promise is returned * + * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. * - * @param {number} [options.servicesHealthStateFilter] 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 value - * 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. + * @reject {Error} - The error object. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * {function} optionalCallback(err, result, request, response) * + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedServiceReplicaDetailInfo} for more + * information. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [options.applicationHealthPolicy] 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. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback); + } + } + + /** + * @summary 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 {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {string} nodeName The name of the node. * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * @param {uuid} partitionId The identity of the partition. * + * @param {string} replicaId The identifier of the replica. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @param {object} [options] Optional Parameters. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @returns {Promise} A promise is returned * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * 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. + * @reject {Error} - The error object. + */ + restartReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} nodeName The name of the node. * - * 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. + * @param {uuid} partitionId The identity of the partition. * + * @param {string} replicaId The identifier of the replica. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -32485,7 +55326,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -32493,14 +55334,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationHealthUsingPolicy(applicationId, options, optionalCallback) { + restartReplica(nodeName, partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -32509,140 +55349,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationHealthUsingPolicy(applicationId, options, (err, result, request, response) => { + self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationHealthUsingPolicy(applicationId, options, optionalCallback); + return self._restartReplica(nodeName, partitionId, replicaId, options, optionalCallback); } } /** - * @summary 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. - * - * - * @param {string} [healthInformation.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. - * + * @summary Removes a service replica running on a node. * - * @param {string} [healthInformation.sequenceNumber] 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. + * 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 {string} nodeName The name of the node. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {uuid} partitionId The identity of the partition. * + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * + * @param {boolean} [options.forceRemove] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -32653,11 +55401,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportApplicationHealthWithHttpOperationResponse(applicationId, healthInformation, options) { + removeReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -32668,128 +55416,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. - * - * - * @param {string} [healthInformation.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. - * + * @summary Removes a service replica running on a node. * - * @param {string} [healthInformation.sequenceNumber] 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. + * 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 {string} nodeName The name of the node. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {uuid} partitionId The identity of the partition. * + * @param {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * + * @param {boolean} [options.forceRemove] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -32815,7 +55471,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportApplicationHealth(applicationId, healthInformation, options, optionalCallback) { + removeReplica(nodeName, partitionId, replicaId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -32824,165 +55480,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportApplicationHealth(applicationId, healthInformation, options, (err, result, request, response) => { + self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportApplicationHealth(applicationId, healthInformation, options, optionalCallback); + return self._removeReplica(nodeName, partitionId, replicaId, options, optionalCallback); } } /** - * @summary Starts upgrading an application in the Service Fabric cluster. + * @summary Gets the list of service packages deployed on a Service Fabric + * node. * - * Validates the supplied application upgrade parameters and starts upgrading - * the application if the parameters are valid. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application - * upgrade. - * - * @param {string} applicationUpgradeDescription.name - * - * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion - * - * @param {array} applicationUpgradeDescription.parameters - * - * @param {string} applicationUpgradeDescription.upgradeKind Possible values - * include: 'Invalid', 'Rolling' - * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' - * - * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] - * - * @param {boolean} [applicationUpgradeDescription.forceRestart] - * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] - * - * @param {object} [applicationUpgradeDescription.applicationHealthPolicy] - * - * @param {boolean} - * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. - * - * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. - * - * - * @param {array} - * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeDescription, options) { + getDeployedServicePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -32993,138 +55540,154 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts upgrading an application in the Service Fabric cluster. + * @summary Gets the list of service packages deployed on a Service Fabric + * node. * - * Validates the supplied application upgrade parameters and starts upgrading - * the application if the parameters are valid. + * Returns the information about the service packages deployed on a Service + * Fabric node for the given application. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeDescription Parameters for an application - * upgrade. * - * @param {string} applicationUpgradeDescription.name + * @param {object} [options] Optional Parameters. * - * @param {string} applicationUpgradeDescription.targetApplicationTypeVersion + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {array} applicationUpgradeDescription.parameters + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} applicationUpgradeDescription.upgradeKind Possible values - * include: 'Invalid', 'Rolling' + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [applicationUpgradeDescription.rollingUpgradeMode] Possible - * values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {number} - * [applicationUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * {Promise} A promise is returned * - * @param {boolean} [applicationUpgradeDescription.forceRestart] + * @resolve {Array} - The deserialized result object. * - * @param {object} [applicationUpgradeDescription.monitoringPolicy] + * @reject {Error} - The error object. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.failureAction] Possible - * values include: 'Invalid', 'Rollback', 'Manual' + * {function} optionalCallback(err, result, request, response) * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * {array} [result] - The deserialized result object if an error did not occur. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback); + } + } + + /** + * @summary Gets the list of service packages deployed on a Service Fabric node + * matching exactly the specified name. * - * @param {string} - * [applicationUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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 {object} [applicationUpgradeDescription.applicationHealthPolicy] + * @param {string} nodeName The name of the node. * - * @param {boolean} - * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {number} - * [applicationUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. * + * @param {string} servicePackageName The name of the service package. * - * @param {object} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @param {object} [options] Optional Parameters. * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @returns {Promise} A promise is returned * - * @param {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * 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. + * @reject {Error} - The error object. + */ + getDeployedServicePackageInfoListByNameWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {number} - * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} nodeName The name of the node. * - * 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. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {array} - * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -33136,7 +55699,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -33144,13 +55707,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback) { + getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -33159,51 +55722,84 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startApplicationUpgrade(applicationId, applicationUpgradeDescription, options, optionalCallback); + return self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary Gets details for the latest upgrade performed on this application. + * @summary Gets the information about health of an service package for a + * specific application deployed for a Service Fabric node and application. * - * Returns information about the state of the latest application upgrade along - * with details to aid debugging application health issues. + * Gets the information about health of 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. + * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationUpgradeWithHttpOperationResponse(applicationId, options) { + getDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -33214,24 +55810,57 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest upgrade performed on this application. + * @summary Gets the information about health of an service package for a + * specific application deployed for a Service Fabric node and application. * - * Returns information about the state of the latest application upgrade along - * with details to aid debugging application health issues. + * Gets the information about health of 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {string} servicePackageName The name of the service package. + * * @param {object} [options] Optional Parameters. * + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. + * + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -33243,7 +55872,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationUpgradeProgressInfo} - The deserialized result object. + * @resolve {DeployedServicePackageHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -33252,14 +55881,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationUpgradeProgressInfo} for more + * See {@link DeployedServicePackageHealth} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationUpgrade(applicationId, options, optionalCallback) { + getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -33268,50 +55897,83 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationUpgrade(applicationId, options, (err, result, request, response) => { + self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationUpgrade(applicationId, options, optionalCallback); + return self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary Updates an ongoing application upgrade in the Service Fabric - * cluster. + * @summary Gets the information about health of service package for a specific + * application deployed on a Service Fabric node using the specified policy. * - * 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. + * Gets the information about health of an 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating - * an existing application upgrade. * - * @param {string} applicationUpgradeUpdateDescription.name + * @param {string} servicePackageName The name of the service package. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {object} [options] Optional Parameters. * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {boolean} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] * 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 @@ -33325,10 +55987,11 @@ class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed * values are Byte values from zero to 100 * @@ -33343,7 +56006,7 @@ class ServiceFabricClient extends ServiceClient { * * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed * values are Byte values from zero to 100. * @@ -33358,77 +56021,44 @@ class ServiceFabricClient extends ServiceClient { * * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum 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. - * - * - * @param {array} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * - * @param {object} [applicationUpgradeUpdateDescription.updateDescription] - * - * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' - * - * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] - * - * @param {number} - * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] + * 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. * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateApplicationUpgradeWithHttpOperationResponse(applicationId, applicationUpgradeUpdateDescription, options) { + getDeployedServicePackageHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -33439,38 +56069,71 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates an ongoing application upgrade in the Service Fabric - * cluster. + * @summary Gets the information about health of service package for a specific + * application deployed on a Service Fabric node using the specified policy. * - * 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. + * Gets the information about health of an 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} applicationUpgradeUpdateDescription Parameters for updating - * an existing application upgrade. * - * @param {string} applicationUpgradeUpdateDescription.name + * @param {string} servicePackageName The name of the service package. * - * @param {string} applicationUpgradeUpdateDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {object} [options] Optional Parameters. * - * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy] + * @param {number} [options.eventsHealthStateFilter] 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 value obtained + * using bitwise 'OR' operator. For example, If the provided value is 6 then + * all of the events with HealthState value of OK (2) and Warning (4) are + * returned. * - * @param {boolean} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] + * - Default - Default value. Matches any HealthState. The value is zero. + * - None - Filter that doesn't match any HealthState value. Used in order to + * return no results on a given collection of states. The value is 1. + * - Ok - Filter that matches input with HealthState value Ok. The value is 2. + * - Warning - Filter that matches input with HealthState value Warning. The + * value is 4. + * - Error - Filter that matches input with HealthState value Error. The value + * is 8. + * - All - Filter that matches input with any HealthState value. The value is + * 65535. + * + * + * @param {object} [options.applicationHealthPolicy] 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. + * + * + * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] * 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 @@ -33484,10 +56147,11 @@ class ServiceFabricClient extends ServiceClient { * * * @param {object} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health + * policy used by default to evaluate the health of a service type. * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] * The maximum allowed percentage of unhealthy partitions per service. Allowed * values are Byte values from zero to 100 * @@ -33502,7 +56166,7 @@ class ServiceFabricClient extends ServiceClient { * * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed * values are Byte values from zero to 100. * @@ -33517,7 +56181,7 @@ class ServiceFabricClient extends ServiceClient { * * * @param {number} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values * are Byte values from zero to 100. * @@ -33532,47 +56196,14 @@ class ServiceFabricClient extends ServiceClient { * services. Default percentage is zero. * * - * @param {array} - * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * - * @param {object} [applicationUpgradeUpdateDescription.updateDescription] - * - * @param {string} - * applicationUpgradeUpdateDescription.updateDescription.rollingUpgradeMode - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' - * - * @param {boolean} - * [applicationUpgradeUpdateDescription.updateDescription.forceRestart] - * - * @param {number} - * [applicationUpgradeUpdateDescription.updateDescription.replicaSetCheckTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckStableDurationInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.healthCheckRetryTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeTimeoutInMilliseconds] - * - * @param {string} - * [applicationUpgradeUpdateDescription.updateDescription.upgradeDomainTimeoutInMilliseconds] - * - * @param {object} [options] Optional Parameters. + * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -33584,7 +56215,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {DeployedServicePackageHealth} - The deserialized result object. * * @reject {Error} - The error object. * @@ -33592,13 +56223,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DeployedServicePackageHealth} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback) { + getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -33607,283 +56240,165 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, (err, result, request, response) => { + self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescription, options, optionalCallback); + return self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback); } } /** - * @summary 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters - * for resuming an application upgrade. - * - * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The - * name of the upgrade domain in which to resume the upgrade. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned + * @summary Sends a health report on the Service Fabric deployed service + * package. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * 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. * - * @reject {Error} - The error object. - */ - resumeApplicationUpgradeWithHttpOperationResponse(applicationId, resumeApplicationUpgradeDescription, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} resumeApplicationUpgradeDescription Describes the parameters - * for resuming an application upgrade. - * - * @param {string} resumeApplicationUpgradeDescription.upgradeDomainName The - * name of the upgrade domain in which to resume the upgrade. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @param {string} servicePackageName The name of the service package. * - * @reject {Error} - The error object. + * @param {object} healthInformation 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. * - * {function} optionalCallback(err, result, request, response) + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * - * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} healthInformation.property 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. * - * {object} [request] - The HTTP Request object if an error did not occur. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescription, options, optionalCallback); - } - } - - /** - * @summary 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 rollback 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 {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * @param {object} [options] Optional Parameters. + * If not specified, time to live defaults to infinite value. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [healthInformation.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. * - * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [healthInformation.sequenceNumber] 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. * - * @reject {Error} - The error object. - */ - rollbackApplicationUpgradeWithHttpOperationResponse(applicationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary 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 rollback 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 {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - rollbackApplicationUpgrade(applicationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._rollbackApplicationUpgrade(applicationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._rollbackApplicationUpgrade(applicationId, options, optionalCallback); - } - } - - /** - * @summary Gets the list of applications deployed on a Service Fabric node. - * - * Gets the list of applications deployed on a Service Fabric node. - * - * @param {string} nodeName The name of the node. + * @param {boolean} [options.immediate] A flag which 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedApplicationInfoListWithHttpOperationResponse(nodeName, options) { + reportDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, healthInformation, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { + self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -33894,129 +56409,138 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of applications deployed on a Service Fabric node. - * - * Gets the list of applications deployed on a Service Fabric node. - * - * @param {string} nodeName The name of the node. - * - * @param {object} [options] Optional Parameters. + * @summary Sends a health report on the Service Fabric deployed service + * package. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * 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 {object} [options.customHeaders] Headers that will be added to the - * request * - * @param {function} [optionalCallback] - The optional callback. + * @param {string} nodeName The name of the node. * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, if the application name is "fabric:/myapp/app1", the + * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * previous versions. * - * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @param {string} servicePackageName The name of the service package. * - * @reject {Error} - The error object. + * @param {object} healthInformation 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. * - * {function} optionalCallback(err, result, request, response) + * @param {string} healthInformation.sourceId The source name which identifies + * the client/watchdog/system component which generated the health information. * - * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * @param {string} healthInformation.property 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. * - * {object} [request] - The HTTP Request object if an error did not occur. + * Together with the SourceId, the property uniquely identifies the health + * information. * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getDeployedApplicationInfoList(nodeName, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getDeployedApplicationInfoList(nodeName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getDeployedApplicationInfoList(nodeName, options, optionalCallback); - } - } - - /** - * @summary Gets the information about an application deployed on a Service - * Fabric node. * - * Gets the information about an application deployed on a Service Fabric node. + * @param {string} healthInformation.healthState The health state of a Service + * Fabric entity such as Cluster, Node, Application, Service, Partition, + * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + * 'Unknown' * - * @param {string} nodeName The name of the node. + * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] 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. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * If not specified, time to live defaults to infinite value. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {string} [healthInformation.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. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request * - * @returns {Promise} A promise is returned + * @param {string} [healthInformation.sequenceNumber] 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. * - * @resolve {HttpOperationResponse} - The deserialized result object. * - * @reject {Error} - The error object. - */ - getDeployedApplicationInfoWithHttpOperationResponse(nodeName, applicationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the information about an application deployed on a Service - * Fabric node. + * @param {boolean} [healthInformation.removeWhenExpired] 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, is the reporter has issues (eg. 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. * - * Gets the information about an application deployed on a Service Fabric node. * - * @param {string} nodeName The name of the node. + * @param {object} [options] Optional Parameters. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {boolean} [options.immediate] A flag which 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. * - * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34028,7 +56552,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -34036,15 +56560,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback) { + reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -34053,114 +56575,70 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationInfo(nodeName, applicationId, options, (err, result, request, response) => { + self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationInfo(nodeName, applicationId, options, optionalCallback); + return self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback); } } /** - * @summary 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. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * @param {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * 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 {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} nodeName The name of the node. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} deployServicePackageToNodeDescription Describes information + * for deploying a service package to a Service Fabric node. * + * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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. + * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. * + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, options) { + deployServicePackageToNodeWithHttpOperationResponse(nodeName, deployServicePackageToNodeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -34171,87 +56649,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} nodeName The name of the node. + * @summary Downloads all of the code packages associated with specified + * service manifest on the specified node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * 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 {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} nodeName The name of the node. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} deployServicePackageToNodeDescription Describes information + * for deploying a service package to a Service Fabric node. * + * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * The name of service manifest whose packages need to be downloaded. * - * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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. + * @param {string} deployServicePackageToNodeDescription.applicationTypeName + * The application type name as defined in the application manifest. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * The version of the application type as defined in the application manifest. * + * @param {string} deployServicePackageToNodeDescription.nodeName The name of a + * Service Fabric node. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * List of package sharing policy information. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34263,7 +56697,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -34271,15 +56705,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationHealth} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback) { + deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -34288,367 +56720,101 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationHealth(nodeName, applicationId, options, (err, result, request, response) => { + self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationHealth(nodeName, applicationId, options, optionalCallback); + return self._deployServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback); } } /** - * @summary 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 {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. - * - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * - * @param {boolean} [options.excludeHealthStatistics] 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. - * - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getDeployedApplicationHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary 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. + * @summary 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.deployedServicePackagesHealthStateFilter] 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 value obtained using 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. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * character. + * For example, 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 {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @param {object} [options] Optional Parameters. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * 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. + * @param {string} [options.codePackageName] The name of code package specified + * in service manifest registered as part of an application type in a Service + * Fabric cluster. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * 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. + * @returns {Promise} A promise is returned * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @reject {Error} - The error object. + */ + getDeployedCodePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the list of code packages deployed on a Service Fabric node. * - * 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. + * Gets the list of code packages deployed on a Service Fabric node for the + * given application. * + * @param {string} nodeName The name of the node. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {boolean} [options.excludeHealthStatistics] 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. * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} [options.codePackageName] The name of code package specified + * in service manifest registered as part of an application type in a Service + * Fabric cluster. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34660,7 +56826,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedApplicationHealth} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -34668,15 +56834,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedApplicationHealth} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback) { + getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -34685,144 +56849,73 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, (err, result, request, response) => { + self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, options, optionalCallback); + return self._getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback); } } /** - * @summary 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. + * @summary 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. * + * @param {object} restartDeployedCodePackageDescription Describes the deployed + * code package on Service Fabric node to restart. * - * @param {string} [healthInformation.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. + * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. * + * @param {string} + * [restartDeployedCodePackageDescription.servicePackageActivationId] 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. * - * @param {string} [healthInformation.sequenceNumber] 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. * + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * 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. * * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34833,11 +56926,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportDeployedApplicationHealthWithHttpOperationResponse(nodeName, applicationId, healthInformation, options) { + restartDeployedCodePackageWithHttpOperationResponse(nodeName, applicationId, restartDeployedCodePackageDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { + self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -34848,132 +56941,61 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary 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 {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. * + * @param {object} restartDeployedCodePackageDescription Describes the deployed + * code package on Service Fabric node to restart. * - * @param {string} [healthInformation.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. + * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * The name of service manifest that specified this code package. * + * @param {string} + * [restartDeployedCodePackageDescription.servicePackageActivationId] 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. * - * @param {string} [healthInformation.sequenceNumber] 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. * + * @param {string} restartDeployedCodePackageDescription.codePackageName The + * name of the code package defined in the service manifest. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * 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. * * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34999,7 +57021,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback) { + restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35008,48 +57030,69 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, (err, result, request, response) => { + self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportDeployedApplicationHealth(nodeName, applicationId, healthInformation, options, optionalCallback); + return self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback); } } /** - * @summary Gets the manifest describing an application type. + * @summary Gets the container logs for container deployed on a Service Fabric + * node. * - * Gets the manifest describing an application type. The response contains the - * application manifest XML as a string. + * Gets the container logs for container deployed on a Service Fabric node for + * the given code package. * - * @param {string} applicationTypeName The name of the application type. + * @param {string} nodeName The name of the node. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationManifestWithHttpOperationResponse(applicationTypeName, applicationTypeVersion, options) { + getContainerLogsDeployedOnNodeWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35060,21 +57103,42 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the manifest describing an application type. + * @summary Gets the container logs for container deployed on a Service Fabric + * node. * - * Gets the manifest describing an application type. The response contains the - * application manifest XML as a string. + * Gets the container logs for container deployed on a Service Fabric node for + * the given code package. * - * @param {string} applicationTypeName The name of the application type. + * @param {string} nodeName The name of the node. * - * @param {string} applicationTypeVersion The version of the application type. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. + * + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.tail] Number of lines to show from the end of the + * logs. Default is 100. 'all' to show the complete logs. + * + * @param {boolean} [options.previous] Specifies whether to get container logs + * from exited/dead containers of the code package instance. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35086,7 +57150,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationTypeManifest} - The deserialized result object. + * @resolve {ContainerLogs} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35095,14 +57159,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationTypeManifest} for more - * information. + * See {@link ContainerLogs} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback) { + getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35111,63 +57174,81 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, (err, result, request, response) => { + self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationManifest(applicationTypeName, applicationTypeVersion, options, optionalCallback); + return self._getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifestName, codePackageName, options, optionalCallback); } } /** - * @summary Gets the information about all services belonging to the - * application specified by the application id. + * @summary Invoke container API on a container deployed on a Service Fabric + * node. * - * Returns the information about all services belonging to the application - * specified by the application id. + * Invoke container API on a container deployed on a Service Fabric node for + * the given code package. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {string} [options.serviceTypeName] The service type name used to - * filter the services to query for. + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {string} [options.continuationToken] 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. + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceInfoListWithHttpOperationResponse(applicationId, options) { + invokeContainerApiWithHttpOperationResponse(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35178,36 +57259,54 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about all services belonging to the - * application specified by the application id. + * @summary Invoke container API on a container deployed on a Service Fabric + * node. * - * Returns the information about all services belonging to the application - * specified by the application id. + * Invoke container API on a container deployed on a Service Fabric node for + * the given code package. + * + * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {string} [options.serviceTypeName] The service type name used to - * filter the services to query for. + * @param {string} serviceManifestName The name of a service manifest + * registered as part of an application type in a Service Fabric cluster. * - * @param {string} [options.continuationToken] 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. + * @param {string} codePackageName The name of code package specified in + * service manifest registered as part of an application type in a Service + * Fabric cluster. + * + * @param {string} codePackageInstanceId ID that uniquely identifies a code + * package instance deployed on a service fabric node. + * + * @param {object} containerApiRequestBody Parameters for making container API + * call + * + * @param {string} [containerApiRequestBody.httpVerb] HTTP verb of container + * REST API, defaults to "GET" + * + * @param {string} containerApiRequestBody.uriPath URI path of container REST + * API + * + * @param {string} [containerApiRequestBody.contentType] Content type of + * container REST API request, defaults to "application/json" + * + * @param {string} [containerApiRequestBody.body] HTTP request body of + * container REST API + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35219,7 +57318,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServiceInfoList} - The deserialized result object. + * @resolve {ContainerApiResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35228,13 +57327,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServiceInfoList} for more information. + * See {@link ContainerApiResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceInfoList(applicationId, options, optionalCallback) { + invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35243,59 +57342,70 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceInfoList(applicationId, options, (err, result, request, response) => { + self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceInfoList(applicationId, options, optionalCallback); + return self._invokeContainerApi(nodeName, applicationId, serviceManifestName, codePackageName, codePackageInstanceId, containerApiRequestBody, options, optionalCallback); } } /** - * @summary Gets the information about the specific service belonging to a - * Service Fabric application. + * @summary Creates a Service Fabric compose deployment. * - * Returns the information about specified service belonging to the specified - * Service Fabric application. + * Compose is a file format that describes multi-container applications. This + * API allows deploying container based applications defined in compose format + * in a Service Fabric cluster. Once the deployment is created it's status can + * be tracked via `GetComposeDeploymentStatus` API. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. + * + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryPassword] The + * password for supplied username to connect to container registry. + * + * @param {boolean} + * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceInfoWithHttpOperationResponse(applicationId, serviceId, options) { + createComposeDeploymentWithHttpOperationResponse(createComposeDeploymentDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35306,32 +57416,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about the specific service belonging to a - * Service Fabric application. + * @summary Creates a Service Fabric compose deployment. * - * Returns the information about specified service belonging to the specified - * Service Fabric application. + * Compose is a file format that describes multi-container applications. This + * API allows deploying container based applications defined in compose format + * in a Service Fabric cluster. Once the deployment is created it's status can + * be tracked via `GetComposeDeploymentStatus` API. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} createComposeDeploymentDescription Describes the compose + * deployment that needs to be created. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} createComposeDeploymentDescription.deploymentName The name + * of the deployment. + * + * @param {string} createComposeDeploymentDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [createComposeDeploymentDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryUserName] The + * user name to connect to container registry. + * + * @param {string} + * [createComposeDeploymentDescription.registryCredential.registryPassword] The + * password for supplied username to connect to container registry. + * + * @param {boolean} + * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35343,7 +57464,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35351,14 +57472,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceInfo(applicationId, serviceId, options, optionalCallback) { + createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35367,51 +57487,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceInfo(applicationId, serviceId, options, (err, result, request, response) => { + self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceInfo(applicationId, serviceId, options, optionalCallback); + return self._createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback); } } /** - * @summary Gets the name of the Service Fabric application for a service. + * @summary Gets information about a Service Fabric compose deployment. * - * The GetApplicationName endpoint returns the name of the application for the - * specified service. + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getApplicationNameInfoWithHttpOperationResponse(serviceId, options) { + getComposeDeploymentStatusWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35422,24 +57539,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the name of the Service Fabric application for a service. + * @summary Gets information about a Service Fabric compose deployment. * - * The GetApplicationName endpoint returns the name of the application for the - * specified service. + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35451,7 +57565,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ApplicationNameInfo} - The deserialized result object. + * @resolve {ComposeDeploymentStatusInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35460,13 +57574,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ApplicationNameInfo} for more information. + * See {@link ComposeDeploymentStatusInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getApplicationNameInfo(serviceId, options, optionalCallback) { + getComposeDeploymentStatus(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35475,93 +57590,65 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getApplicationNameInfo(serviceId, options, (err, result, request, response) => { + self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getApplicationNameInfo(serviceId, options, optionalCallback); + return self._getComposeDeploymentStatus(deploymentName, options, optionalCallback); } } /** - * @summary Creates the specified service. - * - * Creates the specified service. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} serviceDescription The information necessary to create a - * service. - * - * @param {string} [serviceDescription.applicationName] - * - * @param {string} serviceDescription.serviceName - * - * @param {string} serviceDescription.serviceTypeName - * - * @param {array} [serviceDescription.initializationData] - * - * @param {object} serviceDescription.partitionDescription - * - * @param {string} serviceDescription.partitionDescription.partitionScheme - * Polymorphic Discriminator - * - * @param {string} [serviceDescription.placementConstraints] 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)". - * - * @param {array} [serviceDescription.correlationScheme] - * - * @param {array} [serviceDescription.serviceLoadMetrics] - * - * @param {array} [serviceDescription.servicePlacementPolicies] - * - * @param {string} [serviceDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' - * - * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates - * if the DefaultMoveCost property is specified. - * - * @param {string} [serviceDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' - * - * @param {string} [serviceDescription.serviceDnsName] The DNS name of the - * service. It requires the DNS system service to be enabled in Service Fabric + * @summary Gets the list of compose deployments created in the Service Fabric * cluster. * - * @param {string} serviceDescription.serviceKind Polymorphic Discriminator + * 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 {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createServiceWithHttpOperationResponse(applicationId, serviceDescription, options) { + getComposeDeploymentStatusListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { + self._getComposeDeploymentStatusList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35572,66 +57659,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates the specified service. - * - * Creates the specified service. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} serviceDescription The information necessary to create a - * service. - * - * @param {string} [serviceDescription.applicationName] - * - * @param {string} serviceDescription.serviceName - * - * @param {string} serviceDescription.serviceTypeName - * - * @param {array} [serviceDescription.initializationData] - * - * @param {object} serviceDescription.partitionDescription - * - * @param {string} serviceDescription.partitionDescription.partitionScheme - * Polymorphic Discriminator - * - * @param {string} [serviceDescription.placementConstraints] 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)". - * - * @param {array} [serviceDescription.correlationScheme] - * - * @param {array} [serviceDescription.serviceLoadMetrics] - * - * @param {array} [serviceDescription.servicePlacementPolicies] - * - * @param {string} [serviceDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' - * - * @param {boolean} [serviceDescription.isDefaultMoveCostSpecified] Indicates - * if the DefaultMoveCost property is specified. - * - * @param {string} [serviceDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' - * - * @param {string} [serviceDescription.serviceDnsName] The DNS name of the - * service. It requires the DNS system service to be enabled in Service Fabric + * @summary Gets the list of compose deployments created in the Service Fabric * cluster. * - * @param {string} serviceDescription.serviceKind Polymorphic Discriminator + * 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 {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35643,7 +57702,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedComposeDeploymentStatusInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35651,13 +57710,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedComposeDeploymentStatusInfoList} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createService(applicationId, serviceDescription, options, optionalCallback) { + getComposeDeploymentStatusList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35666,71 +57727,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createService(applicationId, serviceDescription, options, (err, result, request, response) => { + self._getComposeDeploymentStatusList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createService(applicationId, serviceDescription, options, optionalCallback); + return self._getComposeDeploymentStatusList(options, optionalCallback); } } /** - * @summary Creates a Service Fabric service from the service template defined - * in the application manifest. - * - * Creates a Service Fabric service from the service template defined in the - * application manifest. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} serviceFromTemplateDescription Describes the service that - * needs to be created from the template defined in the application manifest. - * - * @param {string} serviceFromTemplateDescription.applicationName - * - * @param {string} serviceFromTemplateDescription.serviceName - * - * @param {string} serviceFromTemplateDescription.serviceTypeName - * - * @param {array} [serviceFromTemplateDescription.initializationData] + * @summary Gets details for the latest upgrade performed on this Service + * Fabric compose deployment. * - * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * Returns the information about the state of the compose deployment upgrade + * along with details to aid debugging application health issues. * - * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name - * of the service. It requires the DNS system service to be enabled in Service - * Fabric cluster. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createServiceFromTemplateWithHttpOperationResponse(applicationId, serviceFromTemplateDescription, options) { + getComposeDeploymentUpgradeProgressWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { + self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35741,44 +57778,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric service from the service template defined - * in the application manifest. - * - * Creates a Service Fabric service from the service template defined in the - * application manifest. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {object} serviceFromTemplateDescription Describes the service that - * needs to be created from the template defined in the application manifest. - * - * @param {string} serviceFromTemplateDescription.applicationName - * - * @param {string} serviceFromTemplateDescription.serviceName - * - * @param {string} serviceFromTemplateDescription.serviceTypeName - * - * @param {array} [serviceFromTemplateDescription.initializationData] + * @summary Gets details for the latest upgrade performed on this Service + * Fabric compose deployment. * - * @param {string} - * [serviceFromTemplateDescription.servicePackageActivationMode] Possible - * values include: 'SharedProcess', 'ExclusiveProcess' + * Returns the information about the state of the compose deployment upgrade + * along with details to aid debugging application health issues. * - * @param {string} [serviceFromTemplateDescription.serviceDnsName] The DNS name - * of the service. It requires the DNS system service to be enabled in Service - * Fabric cluster. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35790,7 +57803,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ComposeDeploymentUpgradeProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -35798,13 +57811,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ComposeDeploymentUpgradeProgressInfo} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback) { + getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35813,46 +57828,30 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, (err, result, request, response) => { + self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createServiceFromTemplate(applicationId, serviceFromTemplateDescription, options, optionalCallback); + return self._getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric service. + * @summary Deletes an existing Service Fabric compose deployment from cluster. * - * 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 - * 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. + * Deletes an existing Service Fabric compose deployment. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.forceRemove] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35863,11 +57862,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteServiceWithHttpOperationResponse(serviceId, options) { + removeComposeDeploymentWithHttpOperationResponse(deploymentName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteService(serviceId, options, (err, result, request, response) => { + self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -35878,34 +57877,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes an existing Service Fabric service. + * @summary Deletes an existing Service Fabric compose deployment from cluster. * - * 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 - * 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. + * Deletes an existing Service Fabric compose deployment. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.forceRemove] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -35931,7 +57914,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteService(serviceId, options, optionalCallback) { + removeComposeDeployment(deploymentName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -35940,90 +57923,207 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteService(serviceId, options, (err, result, request, response) => { + self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteService(serviceId, options, optionalCallback); + return self._removeComposeDeployment(deploymentName, options, optionalCallback); } } /** - * @summary Updates the specified service using the given update description. + * @summary Starts upgrading a compose deployment in the Service Fabric + * cluster. * - * Updates the specified service using the given update description. + * Validates the supplied upgrade parameters and starts upgrading the + * deployment if the parameters are valid. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * - * @param {object} serviceUpdateDescription The information necessary to update - * a service. + * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading + * compose deployment. * - * @param {string} [serviceUpdateDescription.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. + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. * - * - 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. + * @param {string} composeDeploymentUpgradeDescription.composeFileContent The + * content of the compose file that describes the deployment to create. * + * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. * - * @param {string} [serviceUpdateDescription.placementConstraints] 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)". + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] + * The user name to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] + * The password for supplied username to connect to container registry. * - * @param {array} [serviceUpdateDescription.correlationScheme] + * @param {boolean} + * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. + * + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' * - * @param {array} [serviceUpdateDescription.loadMetrics] + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] + * @param {number} + * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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). * - * @param {string} [serviceUpdateDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * 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. + * + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * 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. + * + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum 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. * - * @param {string} serviceUpdateDescription.serviceKind Polymorphic - * Discriminator + * + * @param {array} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -36034,11 +58134,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - updateServiceWithHttpOperationResponse(serviceId, serviceUpdateDescription, options) { + startComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName, composeDeploymentUpgradeDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { + self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -36049,78 +58149,195 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates the specified service using the given update description. + * @summary Starts upgrading a compose deployment in the Service Fabric + * cluster. * - * Updates the specified service using the given update description. + * Validates the supplied upgrade parameters and starts upgrading the + * deployment if the parameters are valid. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} deploymentName The identity of the deployment. * - * @param {object} serviceUpdateDescription The information necessary to update - * a service. + * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading + * compose deployment. + * + * @param {string} composeDeploymentUpgradeDescription.deploymentName The name + * of the deployment. + * + * @param {string} composeDeploymentUpgradeDescription.composeFileContent The + * content of the compose file that describes the deployment to create. + * + * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * Credential information to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] + * The user name to connect to container registry. + * + * @param {string} + * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] + * The password for supplied username to connect to container registry. + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] + * Indicates that supplied container registry password is encrypted. + * + * @param {string} composeDeploymentUpgradeDescription.upgradeKind The kind of + * upgrade out of the following possible values. Possible values include: + * 'Invalid', 'Rolling' + * + * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] The + * mode used to monitor health during a rolling upgrade. The values are + * UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: + * 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored' + * + * @param {number} + * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * 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). + * + * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] If true, + * then processes are forcefully restarted during upgrade even when the code + * version has not changed (the upgrade only changes configuration or data). + * + * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * Describes the parameters for monitoring an upgrade in Monitored mode. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] 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' + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * 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. + * + * @param {string} + * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * 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. + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy] Defines a + * health policy used to evaluate the health of an application or one of its + * children entities. + * + * + * @param {boolean} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] + * Indicates whether warnings are treated with the same severity as errors. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] + * 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. + * + * + * @param {object} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * The health policy used by default to evaluate the health of a service type. + * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] + * The maximum allowed percentage of unhealthy partitions per service. Allowed + * values are Byte values from zero to 100 * - * @param {string} [serviceUpdateDescription.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. + * 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. * - * - 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. * + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] + * The maximum allowed percentage of unhealthy replicas per partition. Allowed + * values are Byte values from zero to 100. * - * @param {string} [serviceUpdateDescription.placementConstraints] 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)". + * 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. * - * @param {array} [serviceUpdateDescription.correlationScheme] * - * @param {array} [serviceUpdateDescription.loadMetrics] + * @param {number} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] + * The maximum maximum allowed percentage of unhealthy services. Allowed values + * are Byte values from zero to 100. * - * @param {array} [serviceUpdateDescription.servicePlacementPolicies] + * 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. * - * @param {string} [serviceUpdateDescription.defaultMoveCost] Possible values - * include: 'Zero', 'Low', 'Medium', 'High' * - * @param {string} serviceUpdateDescription.serviceKind Polymorphic - * Discriminator + * @param {array} + * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * The map with service type health policy per service type name. The map is + * empty by default. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -36146,7 +58363,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateService(serviceId, serviceUpdateDescription, options, optionalCallback) { + startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -36155,51 +58372,46 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateService(serviceId, serviceUpdateDescription, options, (err, result, request, response) => { + self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateService(serviceId, serviceUpdateDescription, options, optionalCallback); + return self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback); } } /** - * @summary Gets the description of an existing Service Fabric service. + * @summary Get the status of Chaos. * - * Gets the description of an existing Service Fabric service. A service must - * be created before its description can be obtained. + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceDescriptionWithHttpOperationResponse(serviceId, options) { + getChaosWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceDescription(serviceId, options, (err, result, request, response) => { + self._getChaos(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -36210,24 +58422,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the description of an existing Service Fabric service. + * @summary Get the status of Chaos. * - * Gets the description of an existing Service Fabric service. A service must - * be created before its description can be obtained. + * 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -36239,7 +58446,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceDescription} - The deserialized result object. + * @resolve {Chaos} - The deserialized result object. * * @reject {Error} - The error object. * @@ -36248,13 +58455,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceDescription} for more information. + * See {@link Chaos} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceDescription(serviceId, options, optionalCallback) { + getChaos(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -36263,113 +58470,223 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceDescription(serviceId, options, (err, result, request, response) => { + self._getChaos(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceDescription(serviceId, options, optionalCallback); + return self._getChaos(options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric service. + * @summary Starts Chaos in the cluster. * - * 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 - * cmdlet returns an error. + * 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. + * Please refer to the article [Induce controlled Chaos in Service Fabric + * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) + * for more details. * * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} chaosParameters Describes all the parameters to configure a + * Chaos run. * - * @param {object} [options] Optional Parameters. + * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) + * for which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] + * 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. * * - * @param {number} [options.partitionsHealthStateFilter] 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. + * @param {number} [chaosParameters.maxConcurrentFaults] 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 -- + * 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 - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. * + * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or + * disables the move primary and move secondary faults. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * + * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] 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. + * + * + * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * + * + * @param {object} [chaosParameters.clusterHealthPolicy] 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. + * + * + * @param {boolean} + * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates + * whether warnings are treated with the same severity as errors. + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * + * + * @param {array} + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * + * + * @param {object} [chaosParameters.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. + * + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * + * @param {object} [chaosParameters.chaosTargetFilter] 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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. * * + * @param {object} [options] Optional Parameters. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceHealthWithHttpOperationResponse(serviceId, options) { + startChaosWithHttpOperationResponse(chaosParameters, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceHealth(serviceId, options, (err, result, request, response) => { + self._startChaos(chaosParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -36380,86 +58697,196 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric service. + * @summary Starts Chaos in the cluster. * - * 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 - * cmdlet returns an error. + * 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. + * Please refer to the article [Induce controlled Chaos in Service Fabric + * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) + * for more details. * * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} chaosParameters Describes all the parameters to configure a + * Chaos run. * - * @param {object} [options] Optional Parameters. + * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) + * for which Chaos will run before automatically stopping. The maximum allowed + * value is 4,294,967,295 (System.UInt32.MaxValue). * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] + * 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. * * - * @param {number} [options.partitionsHealthStateFilter] 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. + * @param {number} [chaosParameters.maxConcurrentFaults] 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 -- + * 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 - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. * + * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or + * disables the move primary and move secondary faults. + * + * + * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] 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. + * + * + * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] + * Time-separation (in seconds) between two consecutive iterations of Chaos. + * The larger the value, the lower the fault injection rate. + * + * + * @param {object} [chaosParameters.clusterHealthPolicy] 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. + * + * + * @param {boolean} + * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates + * whether warnings are treated with the same severity as errors. + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * + * + * @param {number} + * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. * - * @param {boolean} [options.excludeHealthStatistics] 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. * + * @param {array} + * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] 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. + * + * + * @param {object} [chaosParameters.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. + * + * + * @param {object} [chaosParameters.context.map] Describes a map that contains + * a collection of ChaosContextMapItem's. + * + * + * @param {object} [chaosParameters.chaosTargetFilter] 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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] 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 nodetype (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. + * + * + * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] + * A list of application URI's 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. + * + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -36471,7 +58898,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -36479,14 +58906,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceHealth(serviceId, options, optionalCallback) { + startChaos(chaosParameters, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -36495,194 +58921,186 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceHealth(serviceId, options, (err, result, request, response) => { + self._startChaos(chaosParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceHealth(serviceId, options, optionalCallback); + return self._startChaos(chaosParameters, options, optionalCallback); } } /** - * @summary 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 - * cmdlet returns an error. + * @summary 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @returns {Promise} A promise is returned * - * @param {number} [options.partitionsHealthStateFilter] 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @reject {Error} - The error object. + */ + stopChaosWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._stopChaos(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options.applicationHealthPolicy] 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. * + * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * {Promise} A promise is returned * + * @resolve {null} - The deserialized result object. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @reject {Error} - The error object. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * {function} optionalCallback(err, result, request, response) * - * 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. + * {Error} err - The Error object if an error occurred, null otherwise. * + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * {object} [request] - The HTTP Request object if an error did not occur. * - * 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. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + stopChaos(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._stopChaos(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._stopChaos(options, optionalCallback); + } + } + + /** + * @summary 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 {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. + * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceHealthUsingPolicyWithHttpOperationResponse(serviceId, options) { + getChaosEventsWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { + self._getChaosEvents(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -36693,167 +59111,140 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 - * cmdlet returns an error. + * @summary 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {string} [options.continuationToken] 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 - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.startTimeUtc] The Windows file time representing + * the start time of the time range for which a Chaos report is to be + * generated. Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * + * @param {string} [options.endTimeUtc] The Windows file time representing the + * end time of the time range for which a Chaos report is to be generated. + * Please consult [DateTime.ToFileTimeUtc + * Method](https://msdn.microsoft.com/en-us/library/system.datetime.tofiletimeutc(v=vs.110).aspx) + * for details. * - * @param {number} [options.partitionsHealthStateFilter] 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. + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [options.applicationHealthPolicy] 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. + * @param {function} [optionalCallback] - The optional callback. * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {Promise} A promise is returned * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * @resolve {ChaosEventsSegment} - The deserialized result object. * + * @reject {Error} - The error object. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * {Error} err - The Error object if an error occurred, null otherwise. * - * 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ChaosEventsSegment} for more information. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getChaosEvents(options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getChaosEvents(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getChaosEvents(options, optionalCallback); + } + } + + /** + * @summary Get the Chaos Schedule defining when and how to run Chaos. * - * 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. + * Gets the version of the Chaos Schedule in use and the Chaos Schedule that + * defines when and how to run Chaos. * * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {object} [options] Optional Parameters. * - * 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @returns {Promise} A promise is returned * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @reject {Error} - The error object. + */ + getChaosScheduleWithHttpOperationResponse(options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getChaosSchedule(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -36865,7 +59256,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceHealth} - The deserialized result object. + * @resolve {ChaosScheduleDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -36874,13 +59265,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceHealth} for more information. + * See {@link ChaosScheduleDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceHealthUsingPolicy(serviceId, options, optionalCallback) { + getChaosSchedule(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -36889,142 +59281,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceHealthUsingPolicy(serviceId, options, (err, result, request, response) => { + self._getChaosSchedule(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceHealthUsingPolicy(serviceId, options, optionalCallback); + return self._getChaosSchedule(options, optionalCallback); } } /** - * @summary 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @summary Set the schedule used by Chaos. * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. + * Set the Chaos Schedule currently in use by Chaos. Chaos will automatically + * schedule runs based on the Chaos Schedule. + * The version in the provided input schedule must match the version of the + * Chaos Schedule on the server. + * If the version provided does not match the version on the server, the Chaos + * Schedule is not updated. + * If the version provided matches the version on the server, then the Chaos + * Schedule is updated and the version of the Chaos Schedule on the server is + * incremented up by one and wraps back to 0 after 2,147,483,647. + * If Chaos is running when this call is made, the call will fail. * - * Together with the SourceId, the property uniquely identifies the health - * information. * + * @param {object} chaosSchedule Describes the schedule used by Chaos. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {number} [chaosSchedule.version] The version number of the Schedule. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. * - * If not specified, time to live defaults to infinite value. + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. * * - * @param {string} [healthInformation.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. + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. * * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. * * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -37034,11 +59340,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportServiceHealthWithHttpOperationResponse(serviceId, healthInformation, options) { + postChaosScheduleWithHttpOperationResponse(chaosSchedule, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { + self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37049,130 +59355,44 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @summary Set the schedule used by Chaos. * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. + * Set the Chaos Schedule currently in use by Chaos. Chaos will automatically + * schedule runs based on the Chaos Schedule. + * The version in the provided input schedule must match the version of the + * Chaos Schedule on the server. + * If the version provided does not match the version on the server, the Chaos + * Schedule is not updated. + * If the version provided matches the version on the server, then the Chaos + * Schedule is updated and the version of the Chaos Schedule on the server is + * incremented up by one and wraps back to 0 after 2,147,483,647. + * If Chaos is running when this call is made, the call will fail. * - * Together with the SourceId, the property uniquely identifies the health - * information. * + * @param {object} chaosSchedule Describes the schedule used by Chaos. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @param {number} [chaosSchedule.version] The version number of the Schedule. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @param {object} [chaosSchedule.schedule] Defines the schedule used by Chaos. * - * If not specified, time to live defaults to infinite value. + * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos + * will start using this schedule. * * - * @param {string} [healthInformation.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. + * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos + * will continue to use this schedule until. * * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping + * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule + * Jobs that will be automated by the schedule. * * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -37197,7 +59417,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportServiceHealth(serviceId, healthInformation, options, optionalCallback) { + postChaosSchedule(chaosSchedule, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37206,72 +59426,57 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportServiceHealth(serviceId, healthInformation, options, (err, result, request, response) => { + self._postChaosSchedule(chaosSchedule, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportServiceHealth(serviceId, healthInformation, options, optionalCallback); + return self._postChaosSchedule(chaosSchedule, options, optionalCallback); } } /** - * @summary Resolve a Service Fabric partition. - * - * Resolve a Service Fabric service partition, to get the endpoints of the - * service replicas. - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.partitionKeyType] 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 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 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 the PartitionKeyValue parameter is a name - * of the partition. This is valid for the partitions with partitioning scheme - * as Named. The value is 3. + * @summary 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 {string} [options.partitionKeyValue] Partition key. This is required - * if the partition scheme for the service is Int64Range or Named. * - * @param {string} [options.previousRspVersion] The value in the Version field - * of the response that was received previously. This is required if the user - * knows that the result that was got previously is stale. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resolveServiceWithHttpOperationResponse(serviceId, options) { + uploadFileWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resolveService(serviceId, options, (err, result, request, response) => { + self._uploadFile(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37282,45 +59487,30 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resolve a Service Fabric partition. - * - * Resolve a Service Fabric service partition, to get the endpoints of the - * service replicas. - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. - * - * @param {object} [options] Optional Parameters. + * @summary Uploads contents of the file to the image store. * - * @param {number} [options.partitionKeyType] 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 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 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 the PartitionKeyValue parameter is a name - * of the partition. This is valid for the partitions with partitioning scheme - * as Named. The value is 3. + * 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 {string} [options.partitionKeyValue] Partition key. This is required - * if the partition scheme for the service is Int64Range or Named. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * - * @param {string} [options.previousRspVersion] The value in the Version field - * of the response that was received previously. This is required if the user - * knows that the result that was got previously is stale. + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -37332,7 +59522,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ResolvedServicePartition} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -37340,15 +59530,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ResolvedServicePartition} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resolveService(serviceId, options, optionalCallback) { + uploadFile(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37357,60 +59545,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resolveService(serviceId, options, (err, result, request, response) => { + self._uploadFile(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resolveService(serviceId, options, optionalCallback); + return self._uploadFile(contentPath, options, optionalCallback); } } /** - * @summary Gets the list of partitions of a Service Fabric service. + * @summary Gets the image store content information. * - * Gets the list of partitions of a Service Fabric service. The response - * include the partition id, partitioning scheme information, keys supported by - * the partition, status, health and other details about the partition. + * Returns the information about the image store content at the specified + * contentPath relative to the root of the image store. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionInfoListWithHttpOperationResponse(serviceId, options) { + getImageStoreContentWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + self._getImageStoreContent(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37421,33 +59596,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of partitions of a Service Fabric service. + * @summary Gets the image store content information. * - * Gets the list of partitions of a Service Fabric service. The response - * include the partition id, partitioning scheme information, keys supported by - * the partition, status, health and other details about the partition. + * Returns the information about the image store content at the specified + * contentPath relative to the root of the image store. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -37459,7 +59621,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedServicePartitionInfoList} - The deserialized result object. + * @resolve {ImageStoreContent} - The deserialized result object. * * @reject {Error} - The error object. * @@ -37468,14 +59630,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedServicePartitionInfoList} for more - * information. + * See {@link ImageStoreContent} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionInfoList(serviceId, options, optionalCallback) { + getImageStoreContent(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37484,48 +59645,48 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionInfoList(serviceId, options, (err, result, request, response) => { + self._getImageStoreContent(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionInfoList(serviceId, options, optionalCallback); + return self._getImageStoreContent(contentPath, options, optionalCallback); } } /** - * @summary Gets the information about a Service Fabric partition. + * @summary Deletes existing image store content. * - * The Partitions endpoint returns information about the specified partition. - * The response include the partition id, partitioning scheme information, keys - * supported by the partition, status, health and other details about the - * partition. + * Deletes existing image store content being found within the given image + * store relative path. This can be used to delete uploaded application + * packages once they are provisioned. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionInfoWithHttpOperationResponse(partitionId, options) { + deleteImageStoreContentWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionInfo(partitionId, options, (err, result, request, response) => { + self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37536,21 +59697,21 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a Service Fabric partition. + * @summary Deletes existing image store content. * - * The Partitions endpoint returns information about the specified partition. - * The response include the partition id, partitioning scheme information, keys - * supported by the partition, status, health and other details about the - * partition. + * Deletes existing image store content being found within the given image + * store relative path. This can be used to delete uploaded application + * packages once they are provisioned. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -37562,7 +59723,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServicePartitionInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -37570,14 +59731,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServicePartitionInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionInfo(partitionId, options, optionalCallback) { + deleteImageStoreContent(contentPath, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37586,46 +59746,44 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionInfo(partitionId, options, (err, result, request, response) => { + self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionInfo(partitionId, options, optionalCallback); + return self._deleteImageStoreContent(contentPath, options, optionalCallback); } } /** - * @summary Gets the name of the Service Fabric service for a partition. - * - * The GetServiceName endpoint returns the name of the service for the - * specified partition. + * @summary Gets the content information at the root of the image store. * - * @param {uuid} partitionId The identity of the partition. + * Returns the information about the image store content at the root of the + * image store. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getServiceNameInfoWithHttpOperationResponse(partitionId, options) { + getImageStoreRootContentWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { + self._getImageStoreRootContent(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37636,19 +59794,17 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the name of the Service Fabric service for a partition. - * - * The GetServiceName endpoint returns the name of the service for the - * specified partition. + * @summary Gets the content information at the root of the image store. * - * @param {uuid} partitionId The identity of the partition. + * Returns the information about the image store content at the root of the + * image store. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -37660,7 +59816,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ServiceNameInfo} - The deserialized result object. + * @resolve {ImageStoreContent} - The deserialized result object. * * @reject {Error} - The error object. * @@ -37669,13 +59825,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ServiceNameInfo} for more information. + * See {@link ImageStoreContent} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getServiceNameInfo(partitionId, options, optionalCallback) { + getImageStoreRootContent(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37684,107 +59840,62 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getServiceNameInfo(partitionId, options, (err, result, request, response) => { + self._getImageStoreRootContent(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getServiceNameInfo(partitionId, options, optionalCallback); + return self._getImageStoreRootContent(options, optionalCallback); } } /** - * @summary Gets the health of the specified Service Fabric partition. - * - * Gets the health information of the specified partition. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. - * If you specify a partition that does not exist in the health store, this - * cmdlet returns an error. - * - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @summary Copies image store content internally * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * Copies the image store content from the source image store relative path to + * the destination image store relative path. * + * @param {object} imageStoreCopyDescription Describes the copy description for + * the image store. * - * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @param {string} imageStoreCopyDescription.remoteSource The relative path of + * source image store content to be copied from. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} imageStoreCopyDescription.remoteDestination The relative + * path of destination image store content to be copied to. * + * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file + * names to be skipped for copying. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionHealthWithHttpOperationResponse(partitionId, options) { + copyImageStoreContentWithHttpOperationResponse(imageStoreCopyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionHealth(partitionId, options, (err, result, request, response) => { + self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -37795,80 +59906,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric partition. - * - * Gets the health information of the specified partition. - * Use EventsHealthStateFilter to filter the collection of health events - * reported on the service based on the health state. - * Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState - * objects on the partition. - * If you specify a partition that does not exist in the health store, this - * cmdlet returns an error. - * - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @summary Copies image store content internally * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * Copies the image store content from the source image store relative path to + * the destination image store relative path. * + * @param {object} imageStoreCopyDescription Describes the copy description for + * the image store. * - * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @param {string} imageStoreCopyDescription.remoteSource The relative path of + * source image store content to be copied from. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} imageStoreCopyDescription.remoteDestination The relative + * path of destination image store content to be copied to. * + * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file + * names to be skipped for copying. * - * @param {boolean} [options.excludeHealthStatistics] 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. + * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -37880,7 +59946,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -37888,14 +59954,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionHealth(partitionId, options, optionalCallback) { + copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -37904,189 +59969,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionHealth(partitionId, options, (err, result, request, response) => { + self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionHealth(partitionId, options, optionalCallback); + return self._copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback); } } /** - * @summary 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 - * cmdlet returns an error. - * - * - * @param {uuid} partitionId The identity of the partition. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) 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. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. + * @summary Cancels an image store upload session. * - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * - * @param {boolean} [options.excludeHealthStatistics] 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. + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * * + * @param {uuid} sessionId 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. + * + * @param {object} [options] Optional Parameters. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionHealthUsingPolicyWithHttpOperationResponse(partitionId, options) { + deleteImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { + self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38097,162 +60022,129 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the health of the specified Service Fabric partition, by using - * the specified health policy. + * @summary Cancels an image store upload session. * - * 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 - * cmdlet returns an error. + * The DELETE request will cause the existing upload session to expire and + * remove any previously uploaded file chunks. * * - * @param {uuid} partitionId The identity of the partition. + * @param {uuid} sessionId 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. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @param {function} [optionalCallback] - The optional callback. * - * @param {number} [options.replicasHealthStateFilter] 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 value obtained using bitwise 'OR' operator. - * For example, If the provided value is 6 then all of the events with - * HealthState value of OK (2) and Warning (4) will be returned. The possible - * values for this parameter include integer value of one of the following - * health states. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * {Promise} A promise is returned * + * @resolve {null} - The deserialized result object. * - * @param {object} [options.applicationHealthPolicy] 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. + * @reject {Error} - The error object. * + * {function} optionalCallback(err, result, request, response) * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * {null} [result] - The deserialized result object if an error did not occur. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteImageStoreUploadSession(sessionId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteImageStoreUploadSession(sessionId, options, optionalCallback); + } + } + + /** + * @summary Commit an image store upload session. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * 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. * - * 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. * + * @param {uuid} sessionId 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. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {object} [options] Optional Parameters. * - * 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @returns {Promise} A promise is returned * - * 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * + * @reject {Error} - The error object. + */ + commitImageStoreUploadSessionWithHttpOperationResponse(sessionId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Commit an image store upload session. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * 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 {boolean} [options.excludeHealthStatistics] 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. * + * @param {uuid} sessionId 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. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38264,7 +60156,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -38272,14 +60164,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionHealthUsingPolicy(partitionId, options, optionalCallback) { + commitImageStoreUploadSession(sessionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -38288,151 +60179,153 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionHealthUsingPolicy(partitionId, options, (err, result, request, response) => { + self._commitImageStoreUploadSession(sessionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionHealthUsingPolicy(partitionId, options, optionalCallback); + return self._commitImageStoreUploadSession(sessionId, options, optionalCallback); } } /** - * @summary Sends a health report on the Service Fabric partition. + * @summary Get the image store upload session by ID. * - * 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. + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * * - * @param {uuid} partitionId The identity of the partition. + * @param {uuid} sessionId 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. * - * @param {object} healthInformation 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. + * @param {object} [options] Optional Parameters. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} healthInformation.property 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. + * @returns {Promise} A promise is returned * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @resolve {HttpOperationResponse} - The deserialized result object. * + * @reject {Error} - The error object. + */ + getImageStoreUploadSessionByIdWithHttpOperationResponse(sessionId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get the image store upload session by ID. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * Gets the image store upload session identified by the given ID. User can + * query the upload session at any time during uploading. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @param {uuid} sessionId 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. * + * @param {object} [options] Optional Parameters. * - * @param {string} [healthInformation.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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {function} [optionalCallback] - The optional callback. * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * {Promise} A promise is returned * + * @resolve {UploadSession} - The deserialized result object. * - * @param {object} [options] Optional Parameters. + * @reject {Error} - The error object. * - * @param {boolean} [options.immediate] A flag which 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. + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getImageStoreUploadSessionById(sessionId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getImageStoreUploadSessionById(sessionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getImageStoreUploadSessionById(sessionId, options, optionalCallback); + } + } + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - reportPartitionHealthWithHttpOperationResponse(partitionId, healthInformation, options) { + getImageStoreUploadSessionByPathWithHttpOperationResponse(contentPath, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { + self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38443,124 +60336,164 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric partition. + * @summary Get the image store upload session by relative path. * - * 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. + * 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 {uuid} partitionId The identity of the partition. + * @param {string} contentPath Relative path to file or folder in the image + * store from its root. * - * @param {object} healthInformation 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. + * @param {object} [options] Optional Parameters. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} healthInformation.property 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. + * @param {function} [optionalCallback] - The optional callback. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * + * {Promise} A promise is returned * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @resolve {UploadSession} - The deserialized result object. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @reject {Error} - The error object. * - * If not specified, time to live defaults to infinite value. + * {function} optionalCallback(err, result, request, response) * + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [healthInformation.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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link UploadSession} for more information. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [healthInformation.sequenceNumber] 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. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getImageStoreUploadSessionByPath(contentPath, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getImageStoreUploadSessionByPath(contentPath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getImageStoreUploadSessionByPath(contentPath, options, optionalCallback); + } + } + + /** + * @summary 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. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {uuid} sessionId 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. * + * @param {string} contentRange 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. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + uploadFileChunkWithHttpOperationResponse(contentPath, sessionId, contentRange, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {string} contentPath Relative path to file or folder in the image + * store from its root. + * + * @param {uuid} sessionId 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. + * + * @param {string} contentRange 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. + * + * @param {object} [options] Optional Parameters. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38586,7 +60519,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportPartitionHealth(partitionId, healthInformation, options, optionalCallback) { + uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -38595,49 +60528,64 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportPartitionHealth(partitionId, healthInformation, options, (err, result, request, response) => { + self._uploadFileChunk(contentPath, sessionId, contentRange, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportPartitionHealth(partitionId, healthInformation, options, optionalCallback); + return self._uploadFileChunk(contentPath, sessionId, contentRange, options, optionalCallback); } } /** - * @summary Gets the load of the specified Service Fabric partition. + * @summary Invokes an administrative command on the given Infrastructure + * Service instance. * - * Returns information about the specified partition. - * The response includes a list of load information. - * Each information includes load metric name, value and last reported time in - * UTC. + * 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 {uuid} partitionId The identity of the partition. + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionLoadInformationWithHttpOperationResponse(partitionId, options) { + invokeInfrastructureCommandWithHttpOperationResponse(command, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { + self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38648,22 +60596,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the load of the specified Service Fabric partition. + * @summary Invokes an administrative command on the given Infrastructure + * Service instance. * - * Returns information about the specified partition. - * The response includes a list of load information. - * Each information includes load metric name, value and last reported time in - * UTC. + * 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 {uuid} partitionId The identity of the partition. + * @param {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38675,7 +60638,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionLoadInformation} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -38683,15 +60646,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionLoadInformation} for more - * information. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionLoadInformation(partitionId, options, optionalCallback) { + invokeInfrastructureCommand(command, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -38700,46 +60661,64 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionLoadInformation(partitionId, options, (err, result, request, response) => { + self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionLoadInformation(partitionId, options, optionalCallback); + return self._invokeInfrastructureCommand(command, options, optionalCallback); } } /** - * @summary Resets the current load of a Service Fabric partition. + * @summary Invokes a read-only query on the given infrastructure service + * instance. * - * Resets the current load of a Service Fabric partition to the default load - * for the service. + * 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. * - * @param {uuid} partitionId The identity of the partition. + * 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - resetPartitionLoadWithHttpOperationResponse(partitionId, options) { + invokeInfrastructureQueryWithHttpOperationResponse(command, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { + self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38750,19 +60729,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Resets the current load of a Service Fabric partition. + * @summary Invokes a read-only query on the given infrastructure service + * instance. * - * Resets the current load of a Service Fabric partition to the default load - * for the service. + * 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. * - * @param {uuid} partitionId The identity of the partition. + * 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 {string} command The text of the command to be invoked. The content + * of the command is infrastructure-specific. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.serviceId] The identity of the infrastructure + * service. This is the full name of the infrastructure service without the + * 'fabric:' URI scheme. This parameter required only for the cluster that have + * more than one instance of infrastructure service running. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38774,7 +60771,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {String} - The deserialized result object. * * @reject {Error} - The error object. * @@ -38782,13 +60779,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {string} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - resetPartitionLoad(partitionId, options, optionalCallback) { + invokeInfrastructureQuery(command, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -38797,35 +60794,67 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._resetPartitionLoad(partitionId, options, (err, result, request, response) => { + self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._resetPartitionLoad(partitionId, options, optionalCallback); + return self._invokeInfrastructureQuery(command, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover a specific partition which is currently stuck in quorum loss. + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * Indicates to the Service Fabric cluster that it should attempt to recover a - * specific partition which is currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. * * @param {uuid} partitionId The identity of the partition. * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38836,11 +60865,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - recoverPartitionWithHttpOperationResponse(partitionId, options) { + startDataLossWithHttpOperationResponse(serviceId, partitionId, operationId, dataLossMode, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverPartition(partitionId, options, (err, result, request, response) => { + self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38851,23 +60880,55 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover a specific partition which is currently stuck in quorum loss. + * @summary 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * Indicates to the Service Fabric cluster that it should attempt to recover a - * specific partition which is currently stuck in quorum loss. This operation - * should only be performed if it is known that the replicas that are down - * cannot be recovered. Incorrect use of this API can cause potential data - * loss. * * @param {uuid} partitionId The identity of the partition. * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} dataLossMode This enum is passed to the StartDataLoss API to + * indicate what type of data loss to induce. Possible values include: + * 'Invalid', 'PartialDataLoss', 'FullDataLoss' + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38893,7 +60954,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverPartition(partitionId, options, optionalCallback) { + startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -38902,55 +60963,60 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverPartition(partitionId, options, (err, result, request, response) => { + self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverPartition(partitionId, options, optionalCallback); + return self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the specified service which is currently stuck in quorum loss. + * @summary 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. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the specified service which is currently stuck in quorum loss. This - * operation should only be performed if it is known that the replicas that are - * down cannot be recovered. Incorrect use of this API can cause potential data - * loss. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverServicePartitionsWithHttpOperationResponse(serviceId, options) { + getDataLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { + self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -38961,28 +61027,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the specified service which is currently stuck in quorum loss. + * @summary 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. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the specified service which is currently stuck in quorum loss. This - * operation should only be performed if it is known that the replicas that are - * down cannot be recovered. Incorrect use of this API can cause potential data - * loss. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38994,7 +61065,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionDataLossProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39002,13 +61073,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionDataLossProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverServicePartitions(serviceId, options, optionalCallback) { + getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39017,33 +61090,58 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverServicePartitions(serviceId, options, (err, result, request, response) => { + self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverServicePartitions(serviceId, options, optionalCallback); + return self._getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the system services which are currently stuck in quorum loss. + * @summary Induces quorum loss for a given stateful service partition. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the 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. + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -39054,11 +61152,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - recoverSystemPartitionsWithHttpOperationResponse(options) { + startQuorumLossWithHttpOperationResponse(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverSystemPartitions(options, (err, result, request, response) => { + self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39069,21 +61167,46 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover the system services which are currently stuck in quorum loss. + * @summary Induces quorum loss for a given stateful service partition. * - * Indicates to the Service Fabric cluster that it should attempt to recover - * the 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. + * 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 {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API + * + * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss + * API to indicate what type of quorum loss to induce. Possible values include: + * 'Invalid', 'QuorumReplicas', 'AllReplicas' + * + * @param {number} quorumLossDuration The amount of time for which the + * partition will be kept in quorum loss. This must be specified in seconds. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -39109,7 +61232,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverSystemPartitions(options, optionalCallback) { + startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39118,49 +61241,60 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverSystemPartitions(options, (err, result, request, response) => { + self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverSystemPartitions(options, optionalCallback); + return self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback); } } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover any services (including system services) which are currently stuck - * in quorum loss. + * @summary Gets the progress of a quorum loss operation on a partition started + * using the StartQuorumLoss API. * - * 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. + * Gets the progress of a quorum loss operation started with StartQuorumLoss, + * using the provided OperationId. + * + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - recoverAllPartitionsWithHttpOperationResponse(options) { + getQuorumLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._recoverAllPartitions(options, (err, result, request, response) => { + self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39171,22 +61305,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Indicates to the Service Fabric cluster that it should attempt to - * recover any services (including system services) which are currently stuck - * in quorum loss. + * @summary Gets the progress of a quorum loss operation on a partition started + * using the StartQuorumLoss API. * - * 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. + * Gets the progress of a quorum loss operation started with StartQuorumLoss, + * using the provided OperationId. + * + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. + * + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -39198,7 +61343,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PartitionQuorumLossProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39206,13 +61351,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionQuorumLossProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - recoverAllPartitions(options, optionalCallback) { + getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39221,201 +61368,69 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._recoverAllPartitions(options, (err, result, request, response) => { + self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._recoverAllPartitions(options, optionalCallback); - } - } - - /** - * @summary 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 {object} repairTask Describes the repair task to be created or - * updated. - * - * @param {string} repairTask.taskId The ID of the repair task. - * - * @param {string} [repairTask.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. - * - * - * @param {string} [repairTask.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. - * - * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' - * - * @param {number} [repairTask.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 - * - * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. - * - * - * @param {object} [repairTask.target] - * - * @param {string} repairTask.target.kind Polymorphic Discriminator - * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. - * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. - * - * @param {object} [repairTask.impact] - * - * @param {string} repairTask.impact.kind Polymorphic Discriminator - * - * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' - * - * @param {number} [repairTask.resultCode] 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. - * - * - * @param {string} [repairTask.resultDetails] 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. - * - * - * @param {object} [repairTask.history] - * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. - * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. - * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. - * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state - * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state - * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state + return self._getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback); + } + } + + /** + * @summary This API will restart some or all replicas or instances of the + * specified partition. * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state + * This API is useful for testing failover. * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. + * If used to target a stateless service partition, RestartPartitionMode must + * be AllReplicasOrInstances. * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. + * Call the GetPartitionRestartProgress API using the same OperationId to get + * the progress. * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createRepairTaskWithHttpOperationResponse(repairTask, options) { + startPartitionRestartWithHttpOperationResponse(serviceId, partitionId, operationId, restartPartitionMode, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createRepairTask(repairTask, options, (err, result, request, response) => { + self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39426,175 +61441,168 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary This API will restart some or all replicas or instances of the + * specified partition. * + * This API is useful for testing failover. * - * @param {object} repairTask Describes the repair task to be created or - * updated. + * If used to target a stateless service partition, RestartPartitionMode must + * be AllReplicasOrInstances. * - * @param {string} repairTask.taskId The ID of the repair task. + * Call the GetPartitionRestartProgress API using the same OperationId to get + * the progress. * - * @param {string} [repairTask.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. * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} [repairTask.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. * + * @param {uuid} partitionId The identity of the partition. * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {number} [repairTask.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 + * @param {string} restartPartitionMode Describe which partitions to restart. + * Possible values include: 'Invalid', 'AllReplicasOrInstances', + * 'OnlyActiveSecondaries' * + * @param {object} [options] Optional Parameters. * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [repairTask.target] + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} repairTask.target.kind Polymorphic Discriminator + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. + * {Promise} A promise is returned * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. + * @resolve {null} - The deserialized result object. * - * @param {object} [repairTask.impact] + * @reject {Error} - The error object. * - * @param {string} repairTask.impact.kind Polymorphic Discriminator + * {function} optionalCallback(err, result, request, response) * - * @param {string} [repairTask.resultStatus] 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. + * {Error} err - The Error object if an error occurred, null otherwise. * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {number} [repairTask.resultCode] 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. + * {object} [request] - The HTTP Request object if an error did not occur. * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback); + } + } + + /** + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. * - * @param {string} [repairTask.resultDetails] 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. + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. * * - * @param {object} [repairTask.history] + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. + * @param {uuid} partitionId The identity of the partition. * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state + * @param {object} [options] Optional Parameters. * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state + * @returns {Promise} A promise is returned * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. + * @reject {Error} - The error object. + */ + getPartitionRestartProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the progress of a PartitionRestart operation started using + * StartPartitionRestart. * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. + * Gets the progress of a PartitionRestart started with StartPartitionRestart + * using the provided OperationId. * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' * - * @param {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39605,7 +61613,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {PartitionRestartProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39614,13 +61622,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * See {@link PartitionRestartProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createRepairTask(repairTask, options, optionalCallback) { + getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39629,56 +61638,68 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createRepairTask(repairTask, options, (err, result, request, response) => { + self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createRepairTask(repairTask, options, optionalCallback); + return self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback); } } /** - * @summary Requests the cancellation of the given repair task. + * @summary Starts or stops a cluster node. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * 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 {object} repairTaskCancelDescription Describes the repair task to be - * cancelled. + * @param {string} nodeName The name of the node. * - * @param {string} repairTaskCancelDescription.taskId The ID of the repair - * task. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [repairTaskCancelDescription.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. + * @param {string} nodeTransitionType 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' * - * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. + * + * @param {number} stopDurationInSeconds 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. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - cancelRepairTaskWithHttpOperationResponse(repairTaskCancelDescription, options) { + startNodeTransitionWithHttpOperationResponse(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { + self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39689,30 +61710,42 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Requests the cancellation of the given repair task. + * @summary Starts or stops a cluster node. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * 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 {object} repairTaskCancelDescription Describes the repair task to be - * cancelled. + * @param {string} nodeName The name of the node. * - * @param {string} repairTaskCancelDescription.taskId The ID of the repair - * task. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [repairTaskCancelDescription.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. + * @param {string} nodeTransitionType 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' * - * @param {boolean} [repairTaskCancelDescription.requestAbort] _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. + * @param {string} nodeInstanceId The node instance ID of the target node. + * This can be determined through GetNodeInfo API. + * + * @param {number} stopDurationInSeconds 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. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39723,7 +61756,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39731,14 +61764,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - cancelRepairTask(repairTaskCancelDescription, options, optionalCallback) { + startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39747,51 +61779,51 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._cancelRepairTask(repairTaskCancelDescription, options, (err, result, request, response) => { + self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._cancelRepairTask(repairTaskCancelDescription, options, optionalCallback); + return self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback); } } /** - * @summary Deletes a completed repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @summary Gets the progress of an operation started using + * StartNodeTransition. * + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. * - * @param {object} repairTaskDeleteDescription Describes the repair task to be - * deleted. * - * @param {string} repairTaskDeleteDescription.taskId The ID of the completed - * repair task to be deleted. + * @param {string} nodeName The name of the node. * - * @param {string} [repairTaskDeleteDescription.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. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteRepairTaskWithHttpOperationResponse(repairTaskDeleteDescription, options) { + getNodeTransitionProgressWithHttpOperationResponse(nodeName, operationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { + self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39802,25 +61834,25 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes a completed repair task. - * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @summary Gets the progress of an operation started using + * StartNodeTransition. * + * Gets the progress of an operation started with StartNodeTransition using the + * provided OperationId. * - * @param {object} repairTaskDeleteDescription Describes the repair task to be - * deleted. * - * @param {string} repairTaskDeleteDescription.taskId The ID of the completed - * repair task to be deleted. + * @param {string} nodeName The name of the node. * - * @param {string} [repairTaskDeleteDescription.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. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -39831,7 +61863,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {NodeTransitionProgress} - The deserialized result object. * * @reject {Error} - The error object. * @@ -39839,13 +61871,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link NodeTransitionProgress} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback) { + getNodeTransitionProgress(nodeName, operationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39854,42 +61888,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteRepairTask(repairTaskDeleteDescription, options, (err, result, request, response) => { + self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteRepairTask(repairTaskDeleteDescription, options, optionalCallback); + return self._getNodeTransitionProgress(nodeName, operationId, options, optionalCallback); } } /** - * @summary Gets a list of repair tasks matching the given filters. + * @summary Gets a list of user-induced fault operations filtered by provided + * input. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Gets the a list of user-induced fault operations filtered by provided input. * + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. * - * @param {object} [options] Optional Parameters. * - * @param {string} [options.taskIdFilter] The repair task ID prefix to be - * matched. + * @param {number} stateFilter 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 * - * @param {number} [options.stateFilter] 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 * + * @param {object} [options] Optional Parameters. * - * @param {string} [options.executorFilter] The name of the repair executor - * whose claimed tasks should be included in the list. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -39900,11 +61941,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getRepairTaskListWithHttpOperationResponse(options) { + getFaultOperationListWithHttpOperationResponse(typeFilter, stateFilter, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getRepairTaskList(options, (err, result, request, response) => { + self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -39915,30 +61956,37 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of repair tasks matching the given filters. + * @summary Gets a list of user-induced fault operations filtered by provided + * input. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Gets the a list of user-induced fault operations filtered by provided input. * + * @param {number} typeFilter Used to filter on OperationType for user-induced + * operations. + * 65535 - select all + * 1 - select PartitionDataLoss. + * 2 - select PartitionQuorumLoss. + * 4 - select PartitionRestart. + * 8 - select NodeTransition. * - * @param {object} [options] Optional Parameters. * - * @param {string} [options.taskIdFilter] The repair task ID prefix to be - * matched. + * @param {number} stateFilter 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 * - * @param {number} [options.stateFilter] 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 * + * @param {object} [options] Optional Parameters. * - * @param {string} [options.executorFilter] The name of the repair executor - * whose claimed tasks should be included in the list. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -39964,7 +62012,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getRepairTaskList(options, optionalCallback) { + getFaultOperationList(typeFilter, stateFilter, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -39973,51 +62021,76 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getRepairTaskList(options, (err, result, request, response) => { + self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getRepairTaskList(options, optionalCallback); + return self._getFaultOperationList(typeFilter, stateFilter, options, optionalCallback); } } /** - * @summary Forces the approval of the given repair task. + * @summary Cancels a user-induced fault operation. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * The following is a list of APIs that start fault operations that may be + * cancelled 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/is be + * 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 {object} repairTaskApproveDescription Describes the repair task to be - * approved. * - * @param {string} repairTaskApproveDescription.taskId The ID of the repair - * task. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [repairTaskApproveDescription.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. + * @param {boolean} force Indicates whether to gracefully rollback and clean up + * internal system state modified by executing the user-induced operation. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - forceApproveRepairTaskWithHttpOperationResponse(repairTaskApproveDescription, options) { + cancelOperationWithHttpOperationResponse(operationId, force, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { + self._cancelOperation(operationId, force, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40028,25 +62101,50 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Forces the approval of the given repair task. + * @summary Cancels a user-induced fault operation. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * The following is a list of APIs that start fault operations that may be + * cancelled 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/is be + * 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 {object} repairTaskApproveDescription Describes the repair task to be - * approved. * - * @param {string} repairTaskApproveDescription.taskId The ID of the repair - * task. + * @param {uuid} operationId A GUID that identifies a call of this API. This + * is passed into the corresponding GetProgress API * - * @param {string} [repairTaskApproveDescription.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. + * @param {boolean} force Indicates whether to gracefully rollback and clean up + * internal system state modified by executing the user-induced operation. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -40057,7 +62155,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40065,14 +62163,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback) { + cancelOperation(operationId, force, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40081,63 +62178,79 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._forceApproveRepairTask(repairTaskApproveDescription, options, (err, result, request, response) => { + self._cancelOperation(operationId, force, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._forceApproveRepairTask(repairTaskApproveDescription, options, optionalCallback); + return self._cancelOperation(operationId, force, options, optionalCallback); } } /** - * @summary Updates the health policy of the given repair task. + * @summary Creates a backup policy. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Creates a backup policy which can be associated later with a Service Fabric + * application, service or a partition for periodic backup. * * - * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair - * task healthy policy to be updated. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the - * repair task to be updated. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {string} [repairTaskUpdateHealthPolicyDescription.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. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] 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. + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] 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. + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateRepairTaskHealthPolicyWithHttpOperationResponse(repairTaskUpdateHealthPolicyDescription, options) { + createBackupPolicyWithHttpOperationResponse(backupPolicyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { + self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40148,37 +62261,53 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Updates the health policy of the given repair task. + * @summary Creates a backup policy. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * Creates a backup policy which can be associated later with a Service Fabric + * application, service or a partition for periodic backup. * * - * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair - * task healthy policy to be updated. + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {string} repairTaskUpdateHealthPolicyDescription.taskId The ID of the - * repair task to be updated. + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {string} [repairTaskUpdateHealthPolicyDescription.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. + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performPreparingHealthCheck] 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. + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. * - * @param {boolean} - * [repairTaskUpdateHealthPolicyDescription.performRestoringHealthCheck] 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. + * + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. + * + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator + * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. + * + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. + * + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -40189,7 +62318,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40197,14 +62326,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback) { + createBackupPolicy(backupPolicyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40213,187 +62341,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, (err, result, request, response) => { + self._createBackupPolicy(backupPolicyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, options, optionalCallback); + return self._createBackupPolicy(backupPolicyDescription, options, optionalCallback); } } /** - * @summary 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 {object} repairTask Describes the repair task to be created or - * updated. - * - * @param {string} repairTask.taskId The ID of the repair task. - * - * @param {string} [repairTask.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. - * - * - * @param {string} [repairTask.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. - * - * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' - * - * @param {number} [repairTask.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 - * - * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. - * - * - * @param {object} [repairTask.target] - * - * @param {string} repairTask.target.kind Polymorphic Discriminator - * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. - * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. - * - * @param {object} [repairTask.impact] - * - * @param {string} repairTask.impact.kind Polymorphic Discriminator - * - * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' - * - * @param {number} [repairTask.resultCode] 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. - * - * - * @param {string} [repairTask.resultDetails] 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. - * - * - * @param {object} [repairTask.history] - * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. - * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. - * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. - * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state - * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state - * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state - * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state - * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. - * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. - * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. - * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. + * @summary Deletes the backup policy. * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * 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 {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - * - * @param {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateRepairExecutionStateWithHttpOperationResponse(repairTask, options) { + deleteBackupPolicyWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { + self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40404,161 +62394,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {object} repairTask Describes the repair task to be created or - * updated. - * - * @param {string} repairTask.taskId The ID of the repair task. - * - * @param {string} [repairTask.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. - * - * - * @param {string} [repairTask.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. - * - * - * @param {string} repairTask.state The workflow state of the repair task. - * Valid initial states are Created, Claimed, and Preparing. - * - * - Invalid - Indicates that the repair task state is invalid. All Service - * Fabric enumerations have the invalid value. - * - Created - Indicates that the repair task has been created. - * - Claimed - Indicates that the repair task has been claimed by a repair - * executor. - * - 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 - Indicates that the repair task has been approved by the Repair - * Manager and is safe to execute. - * - Executing - Indicates that execution of the repair task is in progress. - * - Restoring - Indicates that the Repair Manager is restoring the system to - * its pre-repair state, usually by bringing resources back online. - * - Completed - Indicates that the repair task has completed, and no further - * state changes will occur. - * . Possible values include: 'Invalid', 'Created', 'Claimed', 'Preparing', - * 'Approved', 'Executing', 'Restoring', 'Completed' - * - * @param {number} [repairTask.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 - * - * - * @param {string} repairTask.action The requested repair action. Must be - * specified when the repair task is created, and is immutable once set. - * - * - * @param {object} [repairTask.target] - * - * @param {string} repairTask.target.kind Polymorphic Discriminator - * - * @param {string} [repairTask.executor] The name of the repair executor. Must - * be specified in Claimed and later states, and is immutable once set. - * - * @param {string} [repairTask.executorData] A data string that the repair - * executor can use to store its internal state. - * - * @param {object} [repairTask.impact] - * - * @param {string} repairTask.impact.kind Polymorphic Discriminator - * - * @param {string} [repairTask.resultStatus] 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. - * - * - Invalid - Indicates that the repair task result is invalid. All Service - * Fabric enumerations have the invalid value. - * - Succeeded - Indicates that the repair task completed execution - * successfully. - * - Cancelled - Indicates that the repair task was cancelled prior to - * execution. - * - Interrupted - Indicates that execution of the repair task was interrupted - * by a cancellation request after some work had already been performed. - * - Failed - Indicates that there was a failure during execution of the repair - * task. Some work may have been performed. - * - Pending - Indicates that the repair task result is not yet available, - * because the repair task has not finished executing. - * . Possible values include: 'Invalid', 'Succeeded', 'Cancelled', - * 'Interrupted', 'Failed', 'Pending' - * - * @param {number} [repairTask.resultCode] 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. - * - * - * @param {string} [repairTask.resultDetails] 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. - * - * - * @param {object} [repairTask.history] - * - * @param {date} [repairTask.history.createdUtcTimestamp] The time when the - * repair task entered the Created state. - * - * @param {date} [repairTask.history.claimedUtcTimestamp] The time when the - * repair task entered the Claimed state. + * @summary Deletes the backup policy. * - * @param {date} [repairTask.history.preparingUtcTimestamp] The time when the - * repair task entered the Preparing state. - * - * @param {date} [repairTask.history.approvedUtcTimestamp] The time when the - * repair task entered the Approved state - * - * @param {date} [repairTask.history.executingUtcTimestamp] The time when the - * repair task entered the Executing state - * - * @param {date} [repairTask.history.restoringUtcTimestamp] The time when the - * repair task entered the Restoring state - * - * @param {date} [repairTask.history.completedUtcTimestamp] The time when the - * repair task entered the Completed state - * - * @param {date} [repairTask.history.preparingHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Preparing state. - * - * @param {date} [repairTask.history.preparingHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Preparing state. - * - * @param {date} [repairTask.history.restoringHealthCheckStartUtcTimestamp] The - * time when the repair task started the health check in the Restoring state. - * - * @param {date} [repairTask.history.restoringHealthCheckEndUtcTimestamp] The - * time when the repair task completed the health check in the Restoring state. - * - * @param {string} [repairTask.preparingHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' - * - * @param {string} [repairTask.restoringHealthCheckState] Possible values - * include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + * 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 {boolean} [repairTask.performPreparingHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Preparing state. * - * @param {boolean} [repairTask.performRestoringHealthCheck] A value to - * determine if health checks will be performed when the repair task enters the - * Restoring state. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -40569,7 +62421,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {RepairTaskUpdateInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40577,14 +62429,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link RepairTaskUpdateInfo} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateRepairExecutionState(repairTask, options, optionalCallback) { + deleteBackupPolicy(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40593,26 +62444,22 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateRepairExecutionState(repairTask, options, (err, result, request, response) => { + self._deleteBackupPolicy(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateRepairExecutionState(repairTask, options, optionalCallback); + return self._deleteBackupPolicy(backupPolicyName, options, optionalCallback); } } /** - * @summary Gets the information about replicas of a Service Fabric service - * partition. + * @summary Gets all the backup policies configured. * - * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The respons include the id, role, status, health, node - * name, uptime, and other details about the replica. + * Get a list of all the backup policies configured. * - * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -40624,25 +62471,33 @@ class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaInfoListWithHttpOperationResponse(partitionId, options) { + getBackupPolicyListWithHttpOperationResponse(options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { + self._getBackupPolicyList(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40653,14 +62508,10 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about replicas of a Service Fabric service - * partition. + * @summary Gets all the backup policies configured. * - * The GetReplicas endpoint returns information about the replicas of the - * specified partition. The respons include the id, role, status, health, node - * name, uptime, and other details about the replica. + * Get a list of all the backup policies configured. * - * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * @@ -40672,10 +62523,18 @@ class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -40687,7 +62546,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedReplicaInfoList} - The deserialized result object. + * @resolve {PagedBackupPolicyDescriptionList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40696,13 +62555,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedReplicaInfoList} for more information. + * See {@link PagedBackupPolicyDescriptionList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaInfoList(partitionId, options, optionalCallback) { + getBackupPolicyList(options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40711,56 +62571,46 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaInfoList(partitionId, options, (err, result, request, response) => { + self._getBackupPolicyList(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaInfoList(partitionId, options, optionalCallback); + return self._getBackupPolicyList(options, optionalCallback); } } /** - * @summary Gets the information about a replica of a Service Fabric partition. + * @summary Gets a particular backup policy by name. * - * The respons include the id, role, status, health, node name, uptime, and - * other details about the replica. + * Gets a particular backup policy identified by {backupPolicyName} * - * @param {uuid} partitionId The identity of the partition. * - * @param {string} replicaId The identifier of the replica. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaInfoWithHttpOperationResponse(partitionId, replicaId, options) { + getBackupPolicyByNameWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { + self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40771,29 +62621,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about a replica of a Service Fabric partition. + * @summary Gets a particular backup policy by name. * - * The respons include the id, role, status, health, node name, uptime, and - * other details about the replica. + * Gets a particular backup policy identified by {backupPolicyName} * - * @param {uuid} partitionId The identity of the partition. * - * @param {string} replicaId The identifier of the replica. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -40805,7 +62645,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaInfo} - The deserialized result object. + * @resolve {BackupPolicyDescription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40814,13 +62654,14 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaInfo} for more information. + * See {@link BackupPolicyDescription} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaInfo(partitionId, replicaId, options, optionalCallback) { + getBackupPolicyByName(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40829,75 +62670,64 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaInfo(partitionId, replicaId, options, (err, result, request, response) => { + self._getBackupPolicyByName(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaInfo(partitionId, replicaId, options, optionalCallback); + return self._getBackupPolicyByName(backupPolicyName, options, optionalCallback); } } /** - * @summary 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. + * @summary 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 {uuid} partitionId The identity of the partition. * - * @param {string} replicaId The identifier of the replica. + * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {string} [options.continuationToken] 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. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaHealthWithHttpOperationResponse(partitionId, replicaId, options) { + getAllEntitiesBackedUpByPolicyWithHttpOperationResponse(backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { + self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -40907,49 +62737,38 @@ class ServiceFabricClient extends ServiceClient { }); } - /** - * @summary 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 {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + /** + * @summary 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 {string} backupPolicyName The name of the backup policy. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.continuationToken] 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. * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -40961,7 +62780,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaHealth} - The deserialized result object. + * @resolve {PagedBackupEntityList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -40970,13 +62789,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaHealth} for more information. + * See {@link PagedBackupEntityList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaHealth(partitionId, replicaId, options, optionalCallback) { + getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -40985,155 +62804,80 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaHealth(partitionId, replicaId, options, (err, result, request, response) => { + self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaHealth(partitionId, replicaId, options, optionalCallback); + return self._getAllEntitiesBackedUpByPolicy(backupPolicyName, options, optionalCallback); } } /** - * @summary 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 {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {object} [options.applicationHealthPolicy] 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. + * @summary Updates the backup policy. * + * Updates the backup policy identified by {backupPolicyName} * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. * + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * 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. + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. * * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. * - * 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. + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. * - * 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. + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator * + * @param {string} backupPolicyName The name of the backup policy. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getReplicaHealthUsingPolicyWithHttpOperationResponse(partitionId, replicaId, options) { + updateBackupPolicyWithHttpOperationResponse(backupPolicyDescription, backupPolicyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { + self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41144,128 +62888,53 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @summary Updates the backup policy. * + * Updates the backup policy identified by {backupPolicyName} * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. * + * @param {object} backupPolicyDescription Describes the backup policy. * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * @param {string} backupPolicyDescription.name The unique name identifying + * this backup policy. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * @param {boolean} backupPolicyDescription.autoRestoreOnDataLoss Specifies + * whether to trigger restore automatically using the latest available backup + * in case the partition experiences a data loss event. * - * 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. + * @param {number} backupPolicyDescription.maxIncrementalBackups 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. * * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {object} backupPolicyDescription.schedule Describes the backup + * schedule parameters. * - * 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. + * @param {string} backupPolicyDescription.schedule.scheduleKind Polymorphic + * Discriminator * + * @param {object} backupPolicyDescription.storage Describes the details of + * backup storage where to store the periodic backups. * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} [backupPolicyDescription.storage.friendlyName] Friendly name + * for this backup storage. * - * 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. + * @param {string} backupPolicyDescription.storage.storageKind Polymorphic + * Discriminator * + * @param {string} backupPolicyName The name of the backup policy. * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41277,7 +62946,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ReplicaHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41285,14 +62954,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ReplicaHealth} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback) { + updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41301,147 +62969,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, (err, result, request, response) => { + self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getReplicaHealthUsingPolicy(partitionId, replicaId, options, optionalCallback); + return self._updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, optionalCallback); } } /** - * @summary 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 {uuid} partitionId The identity of the partition. - * - * @param {string} replicaId The identifier of the replica. - * - * @param {string} serviceKind The kind of service replica (Stateless or - * Stateful) for which the health is being reported. Following are the possible - * values. - * - Stateless - Does not use Service Fabric to make its state highly available - * or reliable. The value is 1 - * - Stateful - Uses Service Fabric to make its state or part of its state - * highly available and reliable. The value is 2. - * . Possible values include: 'Stateless', 'Stateful' - * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric application. * - * Together with the SourceId, the property uniquely identifies the health - * information. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * 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 {string} [healthInformation.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. - * - * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41452,11 +63022,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportReplicaHealthWithHttpOperationResponse(partitionId, replicaId, serviceKind, healthInformation, options) { + enableApplicationBackupWithHttpOperationResponse(applicationId, enableBackupDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportReplicaHealth(partitionId, replicaId, serviceKind, healthInformation, options, (err, result, request, response) => { + self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41467,135 +63037,150 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Sends a health report on the Service Fabric replica. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric application. * - * 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. + * 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 {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} replicaId The identifier of the replica. * - * @param {string} serviceKind The kind of service replica (Stateless or - * Stateful) for which the health is being reported. Following are the possible - * values. - * - Stateless - Does not use Service Fabric to make its state highly available - * or reliable. The value is 1 - * - Stateful - Uses Service Fabric to make its state or part of its state - * highly available and reliable. The value is 2. - * . Possible values include: 'Stateless', 'Stateful' + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. * - * @param {object} healthInformation 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. + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} healthInformation.property 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @param {function} [optionalCallback] - The optional callback. * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * {Promise} A promise is returned * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @resolve {null} - The deserialized result object. * - * If not specified, time to live defaults to infinite value. + * @reject {Error} - The error object. * + * {function} optionalCallback(err, result, request, response) * - * @param {string} [healthInformation.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. + * {Error} err - The Error object if an error occurred, null otherwise. * + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [healthInformation.sequenceNumber] 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. + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._enableApplicationBackup(applicationId, enableBackupDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._enableApplicationBackup(applicationId, enableBackupDescription, options, optionalCallback); + } + } + + /** + * @summary Disables periodic backup of Service Fabric application. * + * Disables periodic backup of Service Fabric application which was previously + * enabled. * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + disableApplicationBackupWithHttpOperationResponse(applicationId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Disables periodic backup of Service Fabric application. + * + * Disables periodic backup of Service Fabric application which was previously + * enabled. + * + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41621,7 +63206,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportReplicaHealth(partitionId, replicaId, serviceKind, healthInformation, options, optionalCallback) { + disableApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41630,62 +63215,71 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportReplicaHealth(partitionId, replicaId, serviceKind, healthInformation, options, (err, result, request, response) => { + self._disableApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportReplicaHealth(partitionId, replicaId, serviceKind, healthInformation, options, optionalCallback); + return self._disableApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Gets the list of replicas deployed on a Service Fabric node. + * @summary Gets the Service Fabric application backup configuration + * information. * - * 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. + * Gets the Service Fabric backup configuration information for the application + * and the services and partitions under this application. * - * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {uuid} [options.partitionId] The identity of the partition. + * @param {string} [options.continuationToken] 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. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + getApplicationBackupConfigurationInfoWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41696,35 +63290,44 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of replicas deployed on a Service Fabric node. + * @summary Gets the Service Fabric application backup configuration + * information. * - * 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. + * Gets the Service Fabric backup configuration information for the application + * and the services and partitions under this application. * - * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, 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 {object} [options] Optional Parameters. * - * @param {uuid} [options.partitionId] The identity of the partition. + * @param {string} [options.continuationToken] 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. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41736,7 +63339,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41744,13 +63347,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback) { + getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41759,52 +63364,87 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getApplicationBackupConfigurationInfo(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaInfoList(nodeName, applicationId, options, optionalCallback); + return self._getApplicationBackupConfigurationInfo(applicationId, options, optionalCallback); } } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Gets the list of backups available for every partition in this + * application. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * 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 {string} nodeName The name of the node. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaDetailInfoWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + getApplicationBackupListWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41815,25 +63455,60 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Gets the list of backups available for every partition in this + * application. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * 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 {string} nodeName The name of the node. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. + * + * @param {date} [options.startDateTimeFilter] 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. + * + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41845,7 +63520,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41854,14 +63529,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServiceReplicaDetailInfo} for more - * information. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback) { + getApplicationBackupList(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41870,50 +63544,56 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._getApplicationBackupList(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaDetailInfo(nodeName, partitionId, replicaId, options, optionalCallback); + return self._getApplicationBackupList(applicationId, options, optionalCallback); } } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Suspends periodic backup for the specified Service Fabric + * application. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * 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 {string} nodeName The name of the node. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServiceReplicaDetailInfoByPartitionIdWithHttpOperationResponse(nodeName, partitionId, options) { + suspendApplicationBackupWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { + self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -41924,23 +63604,29 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the details of replica deployed on a Service Fabric node. + * @summary Suspends periodic backup for the specified Service Fabric + * application. * - * Gets the details of the replica deployed on a Service Fabric node. The - * information include service kind, service name, current service operation, - * current service operation start date time, partition id, replica/instance - * id, reported load and other information. + * 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 {string} nodeName The name of the node. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -41952,7 +63638,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServiceReplicaDetailInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -41960,15 +63646,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServiceReplicaDetailInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback) { + suspendApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -41977,37 +63661,39 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, (err, result, request, response) => { + self._suspendApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServiceReplicaDetailInfoByPartitionId(nodeName, partitionId, options, optionalCallback); + return self._suspendApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Restarts a service replica of a persisted service running on a - * node. + * @summary Resumes periodic backup of a Service Fabric application which was + * previously suspended. * - * 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. + * The previously suspended Service Fabric application resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {string} nodeName The name of the node. - * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42018,11 +63704,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - restartReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + resumeApplicationBackupWithHttpOperationResponse(applicationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42033,25 +63719,27 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary Resumes periodic backup of a Service Fabric application which was + * previously suspended. * - * @param {string} nodeName The name of the node. + * The previously suspended Service Fabric application resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} replicaId The identifier of the replica. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42077,7 +63765,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartReplica(nodeName, partitionId, replicaId, options, optionalCallback) { + resumeApplicationBackup(applicationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42086,48 +63774,52 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._resumeApplicationBackup(applicationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartReplica(nodeName, partitionId, replicaId, options, optionalCallback); + return self._resumeApplicationBackup(applicationId, options, optionalCallback); } } /** - * @summary Removes a service replica running on a node. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric service. * - * 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. + * 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 {string} nodeName The name of the node. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} replicaId The identifier of the replica. * - * @param {object} [options] Optional Parameters. + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. * - * @param {boolean} [options.forceRemove] 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. + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42138,11 +63830,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - removeReplicaWithHttpOperationResponse(nodeName, partitionId, replicaId, options) { + enableServiceBackupWithHttpOperationResponse(serviceId, enableBackupDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42153,36 +63845,40 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Removes a service replica running on a node. + * @summary Enables periodic backup of stateful partitions under this Service + * Fabric service. * - * 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. + * 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 {string} nodeName The name of the node. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {string} replicaId The identifier of the replica. * - * @param {object} [options] Optional Parameters. + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. * - * @param {boolean} [options.forceRemove] 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. + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42208,7 +63904,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeReplica(nodeName, partitionId, replicaId, options, optionalCallback) { + enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42217,54 +63913,58 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeReplica(nodeName, partitionId, replicaId, options, (err, result, request, response) => { + self._enableServiceBackup(serviceId, enableBackupDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeReplica(nodeName, partitionId, replicaId, options, optionalCallback); + return self._enableServiceBackup(serviceId, enableBackupDescription, options, optionalCallback); } } /** - * @summary Gets the list of service packages deployed on a Service Fabric - * node. + * @summary Disables periodic backup of Service Fabric service which was + * previously enabled. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. + * 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 {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + disableServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._disableServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42275,27 +63975,31 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of service packages deployed on a Service Fabric - * node. + * @summary Disables periodic backup of Service Fabric service which was + * previously enabled. * - * Returns the information about the service packages deployed on a Service - * Fabric node for the given application. + * 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 {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * + * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42307,7 +64011,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42315,13 +64019,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback) { + disableServiceBackup(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42330,58 +64034,70 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._disableServiceBackup(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageInfoList(nodeName, applicationId, options, optionalCallback); + return self._disableServiceBackup(serviceId, options, optionalCallback); } } /** - * @summary Gets the list of service packages deployed on a Service Fabric node - * matching exactly the specified name. + * @summary Gets the Service Fabric service backup configuration information. * - * 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. + * Gets the Service Fabric backup configuration information for the service and + * the partitions under this service. * - * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageInfoListByNameWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + getServiceBackupConfigurationInfoWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42392,31 +64108,43 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of service packages deployed on a Service Fabric node - * matching exactly the specified name. + * @summary Gets the Service Fabric service backup configuration information. * - * 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. + * Gets the Service Fabric backup configuration information for the service and + * the partitions under this service. * - * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42428,7 +64156,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PagedBackupConfigurationInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42436,13 +64164,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupConfigurationInfoList} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback) { + getServiceBackupConfigurationInfo(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42451,82 +64181,87 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getServiceBackupConfigurationInfo(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageInfoListByName(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._getServiceBackupConfigurationInfo(serviceId, options, optionalCallback); } } /** - * @summary Gets the information about health of an service package for a - * specific application deployed for a Service Fabric node and application. + * @summary Gets the list of backups available for every partition in this + * service. * - * Gets the information about health of 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. + * 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 {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * + * @param {date} [options.startDateTimeFilter] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + getServiceBackupListWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getServiceBackupList(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42537,55 +64272,60 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the information about health of an service package for a - * specific application deployed for a Service Fabric node and application. - * - * Gets the information about health of service package for a specific - * 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. + * @summary Gets the list of backups available for every partition in this + * service. * - * @param {string} nodeName The name of the node. + * 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * + * @param {date} [options.startDateTimeFilter] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {date} [options.endDateTimeFilter] 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. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42597,7 +64337,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServicePackageHealth} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42606,14 +64346,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServicePackageHealth} for more - * information. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback) { + getServiceBackupList(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42622,163 +64361,55 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._getServiceBackupList(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._getServiceBackupList(serviceId, options, optionalCallback); } } /** - * @summary 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 an 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. - * + * @summary Suspends periodic backup for the specified Service Fabric service. * - * @param {string} nodeName The name of the node. + * 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 {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. - * - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedServicePackageHealthUsingPolicyWithHttpOperationResponse(nodeName, applicationId, servicePackageName, options) { + suspendServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -42789,136 +64420,28 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 an 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. + * @summary 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 {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.eventsHealthStateFilter] 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 value obtained - * using bitwise 'OR' operator. For example, If the provided value is 6 then - * all of the events with HealthState value of OK (2) and Warning (4) are - * returned. - * - * - Default - Default value. Matches any HealthState. The value is zero. - * - None - Filter that doesn't match any HealthState value. Used in order to - * return no results on a given collection of states. The value is 1. - * - Ok - Filter that matches input with HealthState value Ok. The value is 2. - * - Warning - Filter that matches input with HealthState value Warning. The - * value is 4. - * - Error - Filter that matches input with HealthState value Error. The value - * is 8. - * - All - Filter that matches input with any HealthState value. The value is - * 65535. - * - * - * @param {object} [options.applicationHealthPolicy] 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. - * - * - * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. - * - * @param {number} - * [options.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. - * - * - * @param {object} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * 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. - * - * - * @param {number} - * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum 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. - * - * - * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42930,7 +64453,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {DeployedServicePackageHealth} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -42938,15 +64461,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DeployedServicePackageHealth} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback) { + suspendServiceBackup(serviceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -42955,146 +64476,39 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, (err, result, request, response) => { + self._suspendServiceBackup(serviceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, servicePackageName, options, optionalCallback); + return self._suspendServiceBackup(serviceId, options, optionalCallback); } } /** - * @summary 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. - * + * @summary Resumes periodic backup of a Service Fabric service which was + * previously suspended. * - * @param {string} nodeName The name of the node. + * The previously suspended Service Fabric service resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. - * - * @param {object} healthInformation 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. - * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. - * - * - * @param {string} healthInformation.property 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. - * - * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' - * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. - * - * - * @param {string} [healthInformation.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. - * - * - * @param {string} [healthInformation.sequenceNumber] 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. - * - * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. - * * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. - * - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43105,11 +64519,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - reportDeployedServicePackageHealthWithHttpOperationResponse(nodeName, applicationId, servicePackageName, healthInformation, options) { + resumeServiceBackupWithHttpOperationResponse(serviceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { + self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43120,134 +64534,148 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. - * + * @summary Resumes periodic backup of a Service Fabric service which was + * previously suspended. * - * @param {string} nodeName The name of the node. + * The previously suspended Service Fabric service resumes taking periodic + * backup as per the backup policy currently configured for the same. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. + * @param {string} serviceId The identity of the service. This is typically the + * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + * character. + * For example, if the service name is "fabric:/myapp/app1/svc1", the service + * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * @param {string} servicePackageName The name of the service package. * - * @param {object} healthInformation 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. + * @param {object} [options] Optional Parameters. * - * @param {string} healthInformation.sourceId The source name which identifies - * the client/watchdog/system component which generated the health information. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} healthInformation.property 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. + * @param {function} [optionalCallback] - The optional callback. * - * Together with the SourceId, the property uniquely identifies the health - * information. + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * + * {Promise} A promise is returned * - * @param {string} healthInformation.healthState Possible values include: - * 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' + * @resolve {null} - The deserialized result object. * - * @param {moment.duration} [healthInformation.timeToLiveInMilliSeconds] The - * duration for which this health report is valid. This field is using 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. + * @reject {Error} - The error object. * - * If not specified, time to live defaults to infinite value. + * {function} optionalCallback(err, result, request, response) * + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {string} [healthInformation.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. + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + resumeServiceBackup(serviceId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._resumeServiceBackup(serviceId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resumeServiceBackup(serviceId, options, optionalCallback); + } + } + + /** + * @summary 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 {uuid} partitionId The identity of the partition. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. + * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} [healthInformation.sequenceNumber] 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * + * @returns {Promise} A promise is returned * - * @param {boolean} [healthInformation.removeWhenExpired] Value that indicates - * whether the report is removed from health store when it expires. - * If set to true, the report is remopved 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, is the reporter has issues (eg. 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. + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + enablePartitionBackupWithHttpOperationResponse(partitionId, enableBackupDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary 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 {object} [options] Optional Parameters. * - * @param {boolean} [options.immediate] A flag which 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. + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} enableBackupDescription Specifies the parameters for + * enabling backup. * + * @param {string} enableBackupDescription.backupPolicyName Name of the backup + * policy to be used for enabling periodic backups. + * + * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43273,7 +64701,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback) { + enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43282,46 +64710,36 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, (err, result, request, response) => { + self._enablePartitionBackup(partitionId, enableBackupDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._reportDeployedServicePackageHealth(nodeName, applicationId, servicePackageName, healthInformation, options, optionalCallback); + return self._enablePartitionBackup(partitionId, enableBackupDescription, options, optionalCallback); } } /** - * @summary Downloads packages associated with specified service manifest to - * image cache on specified node. - * - * Downloads packages associated with specified service manifest to image cache - * on specified node. - * - * - * @param {string} nodeName The name of the node. - * - * @param {object} deployServicePackageToNodeDescription Describes information - * for deploying a service package to a Service Fabric node. - * - * @param {string} deployServicePackageToNodeDescription.serviceManifestName + * @summary Disables periodic backup of Service Fabric partition which was + * previously enabled. * - * @param {string} deployServicePackageToNodeDescription.applicationTypeName - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * 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 {string} deployServicePackageToNodeDescription.nodeName * - * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43332,11 +64750,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deployedServicePackageToNodeWithHttpOperationResponse(nodeName, deployServicePackageToNodeDescription, options) { + disablePartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { + self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43347,34 +64765,24 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Downloads packages associated with specified service manifest to - * image cache on specified node. - * - * Downloads packages associated with specified service manifest to image cache - * on specified node. - * - * - * @param {string} nodeName The name of the node. - * - * @param {object} deployServicePackageToNodeDescription Describes information - * for deploying a service package to a Service Fabric node. + * @summary Disables periodic backup of Service Fabric partition which was + * previously enabled. * - * @param {string} deployServicePackageToNodeDescription.serviceManifestName - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeName - * - * @param {string} deployServicePackageToNodeDescription.applicationTypeVersion + * 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 {string} deployServicePackageToNodeDescription.nodeName * - * @param {array} [deployServicePackageToNodeDescription.packageSharingPolicy] + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43400,7 +64808,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback) { + disablePartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43409,60 +64817,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, (err, result, request, response) => { + self._disablePartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deployedServicePackageToNode(nodeName, deployServicePackageToNodeDescription, options, optionalCallback); + return self._disablePartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Gets the list of code packages deployed on a Service Fabric node. + * @summary Gets the partition backup configuration information * - * Gets the list of code packages deployed on a Service Fabric node for the - * given application. + * Gets the Service Fabric Backup configuration information for the specified + * partition. * - * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} [options.codePackageName] The name of code package specified - * in service manifest registered as part of an application type in a Service - * Fabric cluster. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDeployedCodePackageInfoListWithHttpOperationResponse(nodeName, applicationId, options) { + getPartitionBackupConfigurationInfoWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43473,33 +64868,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of code packages deployed on a Service Fabric node. + * @summary Gets the partition backup configuration information * - * Gets the list of code packages deployed on a Service Fabric node for the - * given application. + * Gets the Service Fabric Backup configuration information for the specified + * partition. * - * @param {string} nodeName The name of the node. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceManifestName] The name of a service manifest - * registered as part of an application type in a Service Fabric cluster. - * - * @param {string} [options.codePackageName] The name of code package specified - * in service manifest registered as part of an application type in a Service - * Fabric cluster. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43511,7 +64893,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {PartitionBackupConfigurationInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43519,13 +64901,15 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PartitionBackupConfigurationInfo} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback) { + getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43534,67 +64918,62 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDeployedCodePackageInfoList(nodeName, applicationId, options, (err, result, request, response) => { + self._getPartitionBackupConfigurationInfo(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDeployedCodePackageInfoList(nodeName, applicationId, options, optionalCallback); + return self._getPartitionBackupConfigurationInfo(partitionId, options, optionalCallback); } } /** - * @summary 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 {string} nodeName The name of the node. + * @summary Gets the list of backups available for the specified partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * 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 {object} restartDeployedCodePackageDescription Describes the deployed - * code package on Service Fabric node to restart. * - * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * @param {uuid} partitionId The identity of the partition. * - * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] + * @param {object} [options] Optional Parameters. * - * @param {string} restartDeployedCodePackageDescription.codePackageName + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * - * @param {object} [options] Optional Parameters. + * @param {date} [options.startDateTimeFilter] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {date} [options.endDateTimeFilter] 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. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - restartDeployedCodePackageWithHttpOperationResponse(nodeName, applicationId, restartDeployedCodePackageDescription, options) { + getPartitionBackupListWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { + self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43605,40 +64984,35 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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 {string} nodeName The name of the node. + * @summary Gets the list of backups available for the specified partition. * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. For example, if the application name is "fabric://myapp/app1", - * the application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in - * previous versions. + * 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 {object} restartDeployedCodePackageDescription Describes the deployed - * code package on Service Fabric node to restart. * - * @param {string} restartDeployedCodePackageDescription.serviceManifestName + * @param {uuid} partitionId The identity of the partition. * - * @param {string} - * [restartDeployedCodePackageDescription.servicePackageActivationId] + * @param {object} [options] Optional Parameters. * - * @param {string} restartDeployedCodePackageDescription.codePackageName + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} restartDeployedCodePackageDescription.codePackageInstanceId + * @param {boolean} [options.latest] Specifies whether to get only the most + * recent backup available for a partition for the specified time range. * - * @param {object} [options] Optional Parameters. + * @param {date} [options.startDateTimeFilter] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {date} [options.endDateTimeFilter] 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. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43650,7 +65024,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedBackupInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43658,13 +65032,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback) { + getPartitionBackupList(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43673,50 +65048,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, (err, result, request, response) => { + self._getPartitionBackupList(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._restartDeployedCodePackage(nodeName, applicationId, restartDeployedCodePackageDescription, options, optionalCallback); + return self._getPartitionBackupList(partitionId, options, optionalCallback); } } /** - * @summary Creates a Service Fabric compose deployment. - * - * Creates a Service Fabric compose deployment. - * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. - * - * @param {string} createComposeDeploymentDescription.deploymentName - * - * @param {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. - * - * @param {object} [createComposeDeploymentDescription.registryCredential] - * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. + * @summary Suspends periodic backup for the specified partition. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryPassword] The - * password for supplied username to connect to container registry. + * The partition which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. * - * @param {boolean} - * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43727,11 +65083,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - createComposeDeploymentWithHttpOperationResponse(createComposeDeploymentDescription, options) { + suspendPartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { + self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43742,38 +65098,19 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Creates a Service Fabric compose deployment. - * - * Creates a Service Fabric compose deployment. - * - * @param {object} createComposeDeploymentDescription Describes the compose - * deployment that needs to be created. - * - * @param {string} createComposeDeploymentDescription.deploymentName - * - * @param {string} createComposeDeploymentDescription.composeFileContent The - * content of the compose file that describes the deployment to create. - * - * @param {object} [createComposeDeploymentDescription.registryCredential] - * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryUserName] The - * user name to connect to container registry. + * @summary Suspends periodic backup for the specified partition. * - * @param {string} - * [createComposeDeploymentDescription.registryCredential.registryPassword] The - * password for supplied username to connect to container registry. + * The partition which is configured to take periodic backups, is suspended for + * taking further backups till it is resumed again. * - * @param {boolean} - * [createComposeDeploymentDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43799,7 +65136,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback) { + suspendPartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43808,48 +65145,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createComposeDeployment(createComposeDeploymentDescription, options, (err, result, request, response) => { + self._suspendPartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createComposeDeployment(createComposeDeploymentDescription, options, optionalCallback); + return self._suspendPartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Gets information about a Service Fabric compose deployment. + * @summary Resumes periodic backup of partition which was previously + * suspended. * - * 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. + * The previously suspended partition resumes taking periodic backup as per the + * backup policy currently configured for the same. * - * @param {string} deploymentName The identity of the deployment. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentStatusWithHttpOperationResponse(deploymentName, options) { + resumePartitionBackupWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { + self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43860,21 +65196,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets information about a Service Fabric compose deployment. + * @summary Resumes periodic backup of partition which was previously + * suspended. * - * 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. + * The previously suspended partition resumes taking periodic backup as per the + * backup policy currently configured for the same. * - * @param {string} deploymentName The identity of the deployment. + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43886,7 +65221,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ComposeDeploymentStatusInfo} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -43894,15 +65229,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ComposeDeploymentStatusInfo} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentStatus(deploymentName, options, optionalCallback) { + resumePartitionBackup(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -43911,65 +65244,76 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentStatus(deploymentName, options, (err, result, request, response) => { + self._resumePartitionBackup(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentStatus(deploymentName, options, optionalCallback); + return self._resumePartitionBackup(partitionId, options, optionalCallback); } } /** - * @summary Gets the list of compose deployments created in the Service Fabric - * cluster. + * @summary Triggers backup of the partition's state. * - * 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. + * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. + * @param {object} [options.backupPartitionDescription] 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. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentStatusListWithHttpOperationResponse(options) { + backupPartitionWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentStatusList(options, (err, result, request, response) => { + self._backupPartition(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -43980,38 +65324,49 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the list of compose deployments created in the Service Fabric - * cluster. + * @summary Triggers backup of the partition's state. * - * 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. + * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.continuationToken] 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. + * @param {object} [options.backupPartitionDescription] 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. * - * @param {number} [options.maxResults] 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 queries includes as much - * results as possible that fit in the return message. + * @param {object} [options.backupPartitionDescription.backupStorage] Specifies + * the details of the backup storage where to save the backup. + * + * @param {string} + * [options.backupPartitionDescription.backupStorage.friendlyName] Friendly + * name for this backup storage. + * + * @param {string} options.backupPartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator + * + * @param {number} [options.backupTimeout] 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. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44023,7 +65378,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PagedComposeDeploymentStatusInfoList} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44031,15 +65386,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PagedComposeDeploymentStatusInfoList} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentStatusList(options, optionalCallback) { + backupPartition(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44048,47 +65401,47 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentStatusList(options, (err, result, request, response) => { + self._backupPartition(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentStatusList(options, optionalCallback); + return self._backupPartition(partitionId, options, optionalCallback); } } /** - * @summary Gets details for the latest upgrade performed on this Service - * Fabric compose deployment. + * @summary Gets details for the latest backup triggered for this partition. * - * Returns the information about the state of the compose deployment upgrade - * along with details to aid debugging application health issues. + * Returns information about the state of the latest backup along with details + * or failure reason in case of completion. * - * @param {string} deploymentName The identity of the deployment. + * + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getComposeDeploymentUpgradeProgressWithHttpOperationResponse(deploymentName, options) { + getPartitionBackupProgressWithHttpOperationResponse(partitionId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { + self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44099,20 +65452,20 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets details for the latest upgrade performed on this Service - * Fabric compose deployment. + * @summary Gets details for the latest backup triggered for this partition. * - * Returns the information about the state of the compose deployment upgrade - * along with details to aid debugging application health issues. + * Returns information about the state of the latest backup along with details + * or failure reason in case of completion. * - * @param {string} deploymentName The identity of the deployment. + * + * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44124,7 +65477,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ComposeDeploymentUpgradeProgressInfo} - The deserialized result object. + * @resolve {BackupProgressInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44133,14 +65486,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ComposeDeploymentUpgradeProgressInfo} for - * more information. + * See {@link BackupProgressInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback) { + getPartitionBackupProgress(partitionId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44149,30 +65501,65 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getComposeDeploymentUpgradeProgress(deploymentName, options, (err, result, request, response) => { + self._getPartitionBackupProgress(partitionId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getComposeDeploymentUpgradeProgress(deploymentName, options, optionalCallback); + return self._getPartitionBackupProgress(partitionId, options, optionalCallback); } } /** - * @summary Deletes an existing Service Fabric compose deployment from cluster. + * @summary Triggers restore of the state of the partition using the specified + * restore partition description. * - * Deletes an existing Service Fabric compose deployment. + * 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 {string} deploymentName The identity of the deployment. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.restoreTimeout] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44183,11 +65570,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - removeComposeDeploymentWithHttpOperationResponse(deploymentName, options) { + restorePartitionWithHttpOperationResponse(partitionId, restorePartitionDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { + self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44198,18 +65585,53 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes an existing Service Fabric compose deployment from cluster. + * @summary Triggers restore of the state of the partition using the specified + * restore partition description. * - * Deletes an existing Service Fabric compose deployment. + * 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 {string} deploymentName The identity of the deployment. + * + * @param {uuid} partitionId The identity of the partition. + * + * @param {object} restorePartitionDescription Describes the parameters to + * restore the partition. + * + * @param {uuid} restorePartitionDescription.backupId Unique backup ID. + * + * @param {string} restorePartitionDescription.backupLocation Location of the + * backup relative to the backup storage specified/ configured. + * + * @param {object} [restorePartitionDescription.backupStorage] Location of the + * backup from where the partition will be restored. + * + * @param {string} [restorePartitionDescription.backupStorage.friendlyName] + * Friendly name for this backup storage. + * + * @param {string} restorePartitionDescription.backupStorage.storageKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * + * @param {number} [options.restoreTimeout] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44235,7 +65657,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - removeComposeDeployment(deploymentName, options, optionalCallback) { + restorePartition(partitionId, restorePartitionDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44244,175 +65666,199 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._removeComposeDeployment(deploymentName, options, (err, result, request, response) => { + self._restorePartition(partitionId, restorePartitionDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._removeComposeDeployment(deploymentName, options, optionalCallback); + return self._restorePartition(partitionId, restorePartitionDescription, options, optionalCallback); } } /** - * @summary Starts upgrading a compose deployment in the Service Fabric - * cluster. + * @summary Gets details for the latest restore operation triggered for this + * partition. * - * Validates the supplied upgrade parameters and starts upgrading the - * deployment if the parameters are valid. + * Returns information about the state of the latest restore operation along + * with details or failure reason in case of completion. * - * @param {string} deploymentName The identity of the deployment. * - * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading - * compose deployment. + * @param {uuid} partitionId The identity of the partition. * - * @param {string} composeDeploymentUpgradeDescription.deploymentName + * @param {object} [options] Optional Parameters. * - * @param {string} composeDeploymentUpgradeDescription.composeFileContent The - * content of the compose file that describes the deployment to create. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] - * The user name to connect to container registry. + * @returns {Promise} A promise is returned * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] - * The password for supplied username to connect to container registry. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} - * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * @reject {Error} - The error object. + */ + getPartitionRestoreProgressWithHttpOperationResponse(partitionId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets details for the latest restore operation triggered for this + * partition. * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * Returns information about the state of the latest restore operation along + * with details or failure reason in case of completion. * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' * - * @param {number} - * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * @param {uuid} partitionId The identity of the partition. * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] + * @param {object} [options] Optional Parameters. * - * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * {Promise} A promise is returned * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * @resolve {RestoreProgressInfo} - The deserialized result object. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * @reject {Error} - The error object. * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] + * {function} optionalCallback(err, result, request, response) * - * @param {boolean} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {Error} err - The Error object if an error occurred, null otherwise. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RestoreProgressInfo} for more information. * + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getPartitionRestoreProgress(partitionId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getPartitionRestoreProgress(partitionId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getPartitionRestoreProgress(partitionId, options, optionalCallback); + } + } + + /** + * @summary Gets the list of backups available for the specified backed up + * entity at the specified backup location. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * 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). * - * 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. * + * @param {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. + * + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. * - * 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. + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. * + * @param {object} getBackupByStorageQueryDescription.storage 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. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. * - * 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. + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator * + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. * - * @param {array} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.continuationToken] 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. + * + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startComposeDeploymentUpgradeWithHttpOperationResponse(deploymentName, composeDeploymentUpgradeDescription, options) { + getBackupsFromBackupLocationWithHttpOperationResponse(getBackupByStorageQueryDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { + self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44423,148 +65869,174 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts upgrading a compose deployment in the Service Fabric - * cluster. + * @summary Gets the list of backups available for the specified backed up + * entity at the specified backup location. * - * Validates the supplied upgrade parameters and starts upgrading the - * deployment if the parameters are valid. + * 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 {string} deploymentName The identity of the deployment. * - * @param {object} composeDeploymentUpgradeDescription Parameters for upgrading - * compose deployment. + * @param {object} getBackupByStorageQueryDescription Describes the filters and + * backup storage details to be used for enumerating backups. * - * @param {string} composeDeploymentUpgradeDescription.deploymentName + * @param {date} [getBackupByStorageQueryDescription.startDateTimeFilter] + * Specifies the start date time in ISO8601 from which to enumerate backups. If + * not specified, backups are enumerated from the beginning. * - * @param {string} composeDeploymentUpgradeDescription.composeFileContent The - * content of the compose file that describes the deployment to create. + * @param {date} [getBackupByStorageQueryDescription.endDateTimeFilter] + * Specifies the end date time in ISO8601 till which to enumerate backups. If + * not specified, backups are enumerated till the end. * - * @param {object} [composeDeploymentUpgradeDescription.registryCredential] + * @param {boolean} [getBackupByStorageQueryDescription.latest] If specified as + * true, gets the most recent backup (within the specified time range) for + * every partition under the specified backup entity. * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryUserName] - * The user name to connect to container registry. + * @param {object} getBackupByStorageQueryDescription.storage 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. * - * @param {string} - * [composeDeploymentUpgradeDescription.registryCredential.registryPassword] - * The password for supplied username to connect to container registry. + * @param {string} [getBackupByStorageQueryDescription.storage.friendlyName] + * Friendly name for this backup storage. * - * @param {boolean} - * [composeDeploymentUpgradeDescription.registryCredential.passwordEncrypted] - * Indicates that supplied container registry password is encrypted. + * @param {string} getBackupByStorageQueryDescription.storage.storageKind + * Polymorphic Discriminator * - * @param {string} composeDeploymentUpgradeDescription.upgradeKind Possible - * values include: 'Invalid', 'Rolling' + * @param {object} getBackupByStorageQueryDescription.backupEntity Indicates + * the entity for which to enumerate backups. * - * @param {string} [composeDeploymentUpgradeDescription.rollingUpgradeMode] - * Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', - * 'Monitored' + * @param {string} getBackupByStorageQueryDescription.backupEntity.entityKind + * Polymorphic Discriminator * - * @param {number} - * [composeDeploymentUpgradeDescription.upgradeReplicaSetCheckTimeoutInSeconds] + * @param {object} [options] Optional Parameters. * - * @param {boolean} [composeDeploymentUpgradeDescription.forceRestart] + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [composeDeploymentUpgradeDescription.monitoringPolicy] + * @param {string} [options.continuationToken] 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. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.failureAction] - * Possible values include: 'Invalid', 'Rollback', 'Manual' + * @param {number} [options.maxResults] 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 queries includes as many + * results as possible that fit in the return message. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckStableDurationInMilliseconds] + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckRetryTimeoutInMilliseconds] + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeTimeoutInMilliseconds] + * {Promise} A promise is returned * - * @param {string} - * [composeDeploymentUpgradeDescription.monitoringPolicy.upgradeDomainTimeoutInMilliseconds] + * @resolve {PagedBackupInfoList} - The deserialized result object. * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy] + * @reject {Error} - The error object. * - * @param {boolean} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] - * Indicates whether warnings are treated with the same severity as errors. + * {function} optionalCallback(err, result, request, response) * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.maxPercentUnhealthyDeployedApplications] - * 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. + * {Error} err - The Error object if an error occurred, null otherwise. * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedBackupInfoList} for more information. * - * @param {object} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService] - * The maximum allowed percentage of unhealthy partitions per service. Allowed - * values are Byte values from zero to 100 + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getBackupsFromBackupLocation(getBackupByStorageQueryDescription, options, optionalCallback); + } + } + + /** + * @summary Creates a Service Fabric name. * - * 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. + * Creates the specified Service Fabric name. * + * @param {object} nameDescription Describes the Service Fabric name to be + * created. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] - * The maximum allowed percentage of unhealthy replicas per partition. Allowed - * values are Byte values from zero to 100. + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. * - * 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. + * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {number} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] - * The maximum maximum allowed percentage of unhealthy services. Allowed values - * are Byte values from zero to 100. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * 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. + * @returns {Promise} A promise is returned * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} - * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] + * @reject {Error} - The error object. + */ + createNameWithHttpOperationResponse(nameDescription, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createName(nameDescription, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Creates a Service Fabric name. + * + * Creates the specified Service Fabric name. + * + * @param {object} nameDescription Describes the Service Fabric name to be + * created. + * + * @param {string} nameDescription.name The Service Fabric name, including the + * 'fabric:' URI scheme. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44590,7 +66062,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback) { + createName(nameDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44599,128 +66071,31 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, (err, result, request, response) => { + self._createName(nameDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgradeDescription, options, optionalCallback); + return self._createName(nameDescription, options, optionalCallback); } } /** - * @summary 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. - * Please refer to the article [Induce controlled Chaos in Service Fabric - * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) - * for more details. - * - * - * @param {object} chaosParameters Describes all the parameters to configure a - * Chaos run. - * - * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) - * for which Chaos will run before automatically stopping. The maximum allowed - * value is 4,294,967,295 (System.UInt32.MaxValue). - * - * - * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] - * 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. - * - * - * @param {number} [chaosParameters.maxConcurrentFaults] 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 -- - * 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. - * - * - * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or - * disables the move primary and move secondary faults. - * - * - * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] 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. + * @summary Returns whether the Service Fabric name exists. * + * Returns whether the specified Service Fabric name exists. * - * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] - * Time-separation (in seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. - * - * - * @param {object} [chaosParameters.clusterHealthPolicy] - * - * @param {boolean} - * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates - * whether warnings are treated with the same severity as errors. - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. - * - * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. - * - * - * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] - * - * @param {object} [chaosParameters.context] - * - * @param {object} [chaosParameters.context.map] + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44731,11 +66106,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - startChaosWithHttpOperationResponse(chaosParameters, options) { + getNameExistsInfoWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startChaos(chaosParameters, options, (err, result, request, response) => { + self._getNameExistsInfo(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44746,116 +66121,118 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. - * Please refer to the article [Induce controlled Chaos in Service Fabric - * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) - * for more details. + * @summary Returns whether the Service Fabric name exists. * + * Returns whether the specified Service Fabric name exists. * - * @param {object} chaosParameters Describes all the parameters to configure a - * Chaos run. - * - * @param {string} [chaosParameters.timeToRunInSeconds] Total time (in seconds) - * for which Chaos will run before automatically stopping. The maximum allowed - * value is 4,294,967,295 (System.UInt32.MaxValue). + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * + * @param {object} [options] Optional Parameters. * - * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] - * 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [chaosParameters.maxConcurrentFaults] 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 -- - * 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. + * @param {function} [optionalCallback] - The optional callback. * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or - * disables the move primary and move secondary faults. + * {Promise} A promise is returned * + * @resolve {null} - The deserialized result object. * - * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] 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. + * @reject {Error} - The error object. * + * {function} optionalCallback(err, result, request, response) * - * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] - * Time-separation (in seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. + * {Error} err - The Error object if an error occurred, null otherwise. * + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [chaosParameters.clusterHealthPolicy] + * {object} [request] - The HTTP Request object if an error did not occur. * - * @param {boolean} - * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates - * whether warnings are treated with the same severity as errors. + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNameExistsInfo(nameId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNameExistsInfo(nameId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNameExistsInfo(nameId, options, optionalCallback); + } + } + + /** + * @summary Deletes a Service Fabric name. * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyNodes] 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. + * Deletes the specified Service Fabric name. A name must be created before it + * can be deleted. Deleting a name with child properties will fail. * - * 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. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * In large clusters, some nodes will always be down or out for repairs, so - * this percentage should be configured to tolerate that. + * @param {object} [options] Optional Parameters. * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {number} - * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * 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. + * @returns {Promise} A promise is returned * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} - * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] + * @reject {Error} - The error object. + */ + deleteNameWithHttpOperationResponse(nameId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._deleteName(nameId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Deletes a Service Fabric name. * - * @param {object} [chaosParameters.context] + * 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 {object} [chaosParameters.context.map] + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44881,7 +66258,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startChaos(chaosParameters, options, optionalCallback) { + deleteName(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44890,45 +66267,60 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startChaos(chaosParameters, options, (err, result, request, response) => { + self._deleteName(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startChaos(chaosParameters, options, optionalCallback); + return self._deleteName(nameId, options, optionalCallback); } } /** - * @summary Stops Chaos in the cluster if it is already running, otherwise it - * does nothing. + * @summary 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. * - * Stops Chaos from scheduling further faults; but, the in-flight faults are - * not affected. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - stopChaosWithHttpOperationResponse(options) { + getSubNameInfoListWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._stopChaos(options, (err, result, request, response) => { + self._getSubNameInfoList(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -44939,18 +66331,33 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Stops Chaos in the cluster if it is already running, otherwise it - * does nothing. + * @summary Enumerates all the Service Fabric names under a given name. * - * Stops Chaos from scheduling further faults; but, the in-flight faults are - * not affected. + * 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 {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.recursive] Allows specifying that the search + * performed should be recursive. + * + * @param {string} [options.continuationToken] 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. + * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -44962,7 +66369,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {PagedSubNameInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -44970,13 +66377,14 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PagedSubNameInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - stopChaos(options, optionalCallback) { + getSubNameInfoList(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -44985,31 +66393,35 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._stopChaos(options, (err, result, request, response) => { + self._getSubNameInfoList(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._stopChaos(options, optionalCallback); + return self._getSubNameInfoList(nameId, options, optionalCallback); } } /** - * @summary Gets the next segment of the Chaos report based on the passed-in - * continuation token or the passed-in time-range. + * @summary Gets information on all Service Fabric properties under a given + * name. * - * You can either specify the ContinuationToken to get the next segment of the - * Chaos report or you can specify the time-range - * through StartTimeUtc and EndTimeUtc, but you cannot specify both the - * ContinuationToken and the time-range in the same call. - * When there are more than 100 Chaos events, the Chaos report is returned in - * segments where a segment contains no more than 100 Chaos events. + * A Service Fabric name can have one or more named properties that stores + * custom information. This operation gets the information about these + * properties in a paged list. The information include name, value and metadata + * about each of the properties. * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.includeValues] 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. + * * @param {string} [options.continuationToken] 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 @@ -45018,37 +66430,25 @@ class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The count of ticks representing the - * start time of the time range for which a Chaos report is to be generated. - * Please consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. - * - * @param {string} [options.endTimeUtc] The count of ticks representing the end - * time of the time range for which a Chaos report is to be generated. Please - * consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getChaosReportWithHttpOperationResponse(options) { + getPropertyInfoListWithHttpOperationResponse(nameId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getChaosReport(options, (err, result, request, response) => { + self._getPropertyInfoList(nameId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45059,19 +66459,23 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the next segment of the Chaos report based on the passed-in - * continuation token or the passed-in time-range. + * @summary Gets information on all Service Fabric properties under a given + * name. * - * You can either specify the ContinuationToken to get the next segment of the - * Chaos report or you can specify the time-range - * through StartTimeUtc and EndTimeUtc, but you cannot specify both the - * ContinuationToken and the time-range in the same call. - * When there are more than 100 Chaos events, the Chaos report is returned in - * segments where a segment contains no more than 100 Chaos events. + * A Service Fabric name can have one or more named properties that stores + * custom information. This operation gets the information about these + * properties in a paged list. The information include name, value and metadata + * about each of the properties. * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * * @param {object} [options] Optional Parameters. * + * @param {boolean} [options.includeValues] 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. + * * @param {string} [options.continuationToken] 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 @@ -45080,22 +66484,10 @@ class ServiceFabricClient extends ServiceClient { * results then the continuation token does not contain a value. The value of * this parameter should not be URL encoded. * - * @param {string} [options.startTimeUtc] The count of ticks representing the - * start time of the time range for which a Chaos report is to be generated. - * Please consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. - * - * @param {string} [options.endTimeUtc] The count of ticks representing the end - * time of the time range for which a Chaos report is to be generated. Please - * consult [DateTime.Ticks - * Property](https://msdn.microsoft.com/en-us/library/system.datetime.ticks%28v=vs.110%29) - * for details about tick. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45107,7 +66499,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ChaosReport} - The deserialized result object. + * @resolve {PagedPropertyInfoList} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45116,13 +66508,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ChaosReport} for more information. + * See {@link PagedPropertyInfoList} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getChaosReport(options, optionalCallback) { + getPropertyInfoList(nameId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45131,42 +66523,46 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getChaosReport(options, (err, result, request, response) => { + self._getPropertyInfoList(nameId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getChaosReport(options, optionalCallback); + return self._getPropertyInfoList(nameId, options, optionalCallback); } } /** - * @summary Uploads contents of the file to the image store. + * @summary Creates or updates a Service Fabric property. * - * 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. + * Creates or updates the specified Service Fabric property under a given name. * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type id. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45177,11 +66573,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - uploadFileWithHttpOperationResponse(contentPath, options) { + putPropertyWithHttpOperationResponse(nameId, propertyDescription, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._uploadFile(contentPath, options, (err, result, request, response) => { + self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45192,30 +66588,34 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Uploads contents of the file to the image store. + * @summary Creates or updates a Service Fabric property. * - * 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. + * Creates or updates the specified Service Fabric property under a given name. * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {object} propertyDescription Describes the Service Fabric property to + * be created. + * + * @param {string} propertyDescription.propertyName The name of the Service + * Fabric property. + * + * @param {string} [propertyDescription.customTypeId] The property's custom + * type id. Using this property, the user is able to tag the type of the value + * of the property. + * + * @param {object} propertyDescription.value Describes a Service Fabric + * property value. + * + * @param {string} propertyDescription.value.kind Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45241,7 +66641,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - uploadFile(contentPath, options, optionalCallback) { + putProperty(nameId, propertyDescription, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45250,47 +66650,49 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._uploadFile(contentPath, options, (err, result, request, response) => { + self._putProperty(nameId, propertyDescription, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._uploadFile(contentPath, options, optionalCallback); + return self._putProperty(nameId, propertyDescription, options, optionalCallback); } } /** - * @summary Gets the image store content information. + * @summary Gets the specified Service Fabric property. * - * Returns the information about the image store content at the specified - * contentPath relative to the root of the image store. + * Gets the specified Service Fabric property under a given name. This will + * always return both value and metadata. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageStoreContentWithHttpOperationResponse(contentPath, options) { + getPropertyInfoWithHttpOperationResponse(nameId, propertyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageStoreContent(contentPath, options, (err, result, request, response) => { + self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45301,20 +66703,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the image store content information. + * @summary Gets the specified Service Fabric property. * - * Returns the information about the image store content at the specified - * contentPath relative to the root of the image store. + * Gets the specified Service Fabric property under a given name. This will + * always return both value and metadata. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45326,7 +66730,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageStoreContent} - The deserialized result object. + * @resolve {PropertyInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45335,13 +66739,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageStoreContent} for more information. + * See {@link PropertyInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageStoreContent(contentPath, options, optionalCallback) { + getPropertyInfo(nameId, propertyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45350,33 +66754,34 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageStoreContent(contentPath, options, (err, result, request, response) => { + self._getPropertyInfo(nameId, propertyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageStoreContent(contentPath, options, optionalCallback); + return self._getPropertyInfo(nameId, propertyName, options, optionalCallback); } } /** - * @summary Deletes existing image store content. + * @summary Deletes the specified Service Fabric property. * - * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application - * packages once they are provisioned. + * Deletes the specified Service Fabric property under a given name. A property + * must be created before it can be deleted. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45387,11 +66792,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteImageStoreContentWithHttpOperationResponse(contentPath, options) { + deletePropertyWithHttpOperationResponse(nameId, propertyName, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { + self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45402,21 +66807,22 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Deletes existing image store content. + * @summary Deletes the specified Service Fabric property. * - * Deletes existing image store content being found within the given image - * store relative path. This can be used to delete uploaded application - * packages once they are provisioned. + * Deletes the specified Service Fabric property under a given name. A property + * must be created before it can be deleted. * - * @param {string} contentPath Relative path to file or folder in the image - * store from its root. + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {string} propertyName Specifies the name of the property to get. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45442,7 +66848,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageStoreContent(contentPath, options, optionalCallback) { + deleteProperty(nameId, propertyName, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45451,44 +66857,53 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageStoreContent(contentPath, options, (err, result, request, response) => { + self._deleteProperty(nameId, propertyName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageStoreContent(contentPath, options, optionalCallback); + return self._deleteProperty(nameId, propertyName, options, optionalCallback); } } /** - * @summary Gets the content information at the root of the image store. + * @summary Submits a property batch. * - * Returns the information about the image store content at the root of the - * image store. + * Submits a batch of property operations. Either all or none of the operations + * will be committed. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. + * + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageStoreRootContentWithHttpOperationResponse(options) { + submitPropertyBatchWithHttpOperationResponse(nameId, propertyBatchDescriptionList, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageStoreRootContent(options, (err, result, request, response) => { + self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45499,17 +66914,26 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the content information at the root of the image store. + * @summary Submits a property batch. * - * Returns the information about the image store content at the root of the - * image store. + * Submits a batch of property operations. Either all or none of the operations + * will be committed. + * + * @param {string} nameId The Service Fabric name, without the 'fabric:' URI + * scheme. + * + * @param {object} propertyBatchDescriptionList Describes the property batch + * operations to be submitted. + * + * @param {array} [propertyBatchDescriptionList.operations] A list of the + * property batch operations to be executed. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45521,7 +66945,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageStoreContent} - The deserialized result object. + * @resolve {PropertyBatchInfo} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45530,13 +66954,13 @@ class ServiceFabricClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageStoreContent} for more information. + * See {@link PropertyBatchInfo} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageStoreRootContent(options, optionalCallback) { + submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45545,62 +66969,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageStoreRootContent(options, (err, result, request, response) => { + self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageStoreRootContent(options, optionalCallback); + return self._submitPropertyBatch(nameId, propertyBatchDescriptionList, options, optionalCallback); } } /** - * @summary Copies image store content internally + * @summary Gets all Cluster-related events. * - * Copies the image store content from the source image store relative path to - * the destination image store relative path. + * The response is list of ClusterEvent objects. * - * @param {object} imageStoreCopyDescription Describes the copy description for - * the image store. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} imageStoreCopyDescription.remoteSource The relative path of - * source image store content to be copied from. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} imageStoreCopyDescription.remoteDestination The relative - * path of destination image store content to be copied to. + * @param {object} [options] Optional Parameters. * - * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file - * names to be skipped for copying. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - copyImageStoreContentWithHttpOperationResponse(imageStoreCopyDescription, options) { + getClusterEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { + self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45611,35 +67036,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Copies image store content internally + * @summary Gets all Cluster-related events. * - * Copies the image store content from the source image store relative path to - * the destination image store relative path. + * The response is list of ClusterEvent objects. * - * @param {object} imageStoreCopyDescription Describes the copy description for - * the image store. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} imageStoreCopyDescription.remoteSource The relative path of - * source image store content to be copied from. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} imageStoreCopyDescription.remoteDestination The relative - * path of destination image store content to be copied to. + * @param {object} [options] Optional Parameters. * - * @param {array} [imageStoreCopyDescription.skipFiles] The list of the file - * names to be skipped for copying. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {boolean} [imageStoreCopyDescription.checkMarkFile] 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. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45651,7 +67077,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45659,13 +67085,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback) { + getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45674,64 +67100,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._copyImageStoreContent(imageStoreCopyDescription, options, (err, result, request, response) => { + self._getClusterEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._copyImageStoreContent(imageStoreCopyDescription, options, optionalCallback); + return self._getClusterEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Invokes an administrative command on the given Infrastructure - * Service instance. + * @summary Gets all Containers-related events. * - * 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. + * The response is list of ContainerInstanceEvent objects. * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - invokeInfrastructureCommandWithHttpOperationResponse(command, options) { + getContainersEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { + self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45742,37 +67167,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Invokes an administrative command on the given Infrastructure - * Service instance. + * @summary Gets all Containers-related events. * - * 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. + * The response is list of ContainerInstanceEvent objects. * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45784,7 +67208,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45792,13 +67216,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureCommand(command, options, optionalCallback) { + getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45807,64 +67231,65 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._invokeInfrastructureCommand(command, options, (err, result, request, response) => { + self._getContainersEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._invokeInfrastructureCommand(command, options, optionalCallback); + return self._getContainersEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Invokes a read-only query on the given infrastructure service - * instance. + * @summary Gets a Node-related events. * - * 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. + * The response is list of NodeEvent objects. * - * 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 {string} nodeName The name of the node. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - invokeInfrastructureQueryWithHttpOperationResponse(command, options) { + getNodeEventListWithHttpOperationResponse(nodeName, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { + self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -45875,37 +67300,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary Gets a Node-related events. * - * Available commands and their corresponding response formats vary depending - * upon - * the infrastructure on which the cluster is running. + * The response is list of NodeEvent objects. * - * This API supports the Service Fabric platform; it is not meant to be used - * directly from your code. + * @param {string} nodeName The name of the node. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} command The text of the command to be invoked. The content - * of the command is infrastructure-specific. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.serviceId] The identity of the infrastructure - * service. This is the full name of the infrastructure service without the - * 'fabric:' URI scheme. This parameter required only for the cluster that have - * more than one instance of infrastructure service running. - * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -45917,7 +67343,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -45925,13 +67351,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - invokeInfrastructureQuery(command, options, optionalCallback) { + getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -45940,149 +67366,103 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._invokeInfrastructureQuery(command, options, (err, result, request, response) => { + self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._invokeInfrastructureQuery(command, options, optionalCallback); + return self._getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary 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. + * @summary Gets all Nodes-related Events. * - * This API should only be called with a stateful service as the target. + * The response is list of NodeEvent objects. * - * Calling this API with a system service as the target is not advised. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * 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 {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - PartialDataLoss - PartialDataLoss option will cause a quorum of replicas - * to go down, triggering an OnDataLoss event in the system for the given - * partition. - * - FullDataLoss - FullDataLoss option will drop all the replicas which means - * that all the data will be lost. - * . Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startDataLossWithHttpOperationResponse(serviceId, partitionId, operationId, dataLossMode, options) { + getNodesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { + self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; - }); - }); - } - - /** - * @summary 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. + }); + }); + } + + /** + * @summary Gets all Nodes-related Events. * - * Calling this API with a system service as the target is not advised. + * The response is list of NodeEvent objects. * - * 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. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * Call the GetDataLossProgress API with the same OperationId to return - * information on the operation started with this API. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} dataLossMode This enum is passed to the StartDataLoss API to - * indicate what type of data loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - PartialDataLoss - PartialDataLoss option will cause a quorum of replicas - * to go down, triggering an OnDataLoss event in the system for the given - * partition. - * - FullDataLoss - FullDataLoss option will drop all the replicas which means - * that all the data will be lost. - * . Possible values include: 'Invalid', 'PartialDataLoss', 'FullDataLoss' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46094,7 +67474,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46102,13 +67482,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback) { + getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46117,58 +67497,72 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, (err, result, request, response) => { + self._getNodesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startDataLoss(serviceId, partitionId, operationId, dataLossMode, options, optionalCallback); + return self._getNodesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary 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. + * @summary Gets an Application-related events. * + * The response is list of ApplicationEvent objects. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getDataLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + getApplicationEventListWithHttpOperationResponse(applicationId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46179,31 +67573,45 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of a partition data loss operation started using - * the StartDataLoss API. + * @summary Gets an Application-related events. * - * Gets the progress of a data loss operation started with StartDataLoss, using - * the OperationId. + * The response is list of ApplicationEvent objects. * - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46215,7 +67623,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionDataLossProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46223,15 +67631,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionDataLossProgress} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { + getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46240,76 +67646,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getDataLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getDataLossProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Induces quorum loss for a given stateful service partition. - * - * Induces quorum loss for a given stateful service partition. This API is - * useful for a temporary quorum loss situation on your service. + * @summary Gets all Applications-related events. * - * Call the GetQuorumLossProgress API with the same OperationId to return - * information on the operation started with this API. + * The response is list of ApplicationEvent objects. * - * 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 {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} [options] Optional Parameters. * - * @param {uuid} partitionId The identity of the partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - QuorumReplicas - Partial Quorum loss mode : Minimum number of replicas for - * a partition will be down that will cause a quorum loss. - * - AllReplicas- Full Quorum loss mode : All replicas for a partition will be - * down that will cause a quorum loss. - * . Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startQuorumLossWithHttpOperationResponse(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options) { + getApplicationsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { + self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46320,49 +67713,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Induces quorum loss for a given stateful service partition. - * - * Induces quorum loss for a given stateful service partition. This API is - * useful for a temporary quorum loss situation on your service. + * @summary Gets all Applications-related events. * - * Call the GetQuorumLossProgress API with the same OperationId to return - * information on the operation started with this API. + * The response is list of ApplicationEvent objects. * - * 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 {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {object} [options] Optional Parameters. * - * @param {uuid} partitionId The identity of the partition. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {string} quorumLossMode This enum is passed to the StartQuorumLoss - * API to indicate what type of quorum loss to induce. - * - Invalid - Reserved. Do not pass into API. - * - QuorumReplicas - Partial Quorum loss mode : Minimum number of replicas for - * a partition will be down that will cause a quorum loss. - * - AllReplicas- Full Quorum loss mode : All replicas for a partition will be - * down that will cause a quorum loss. - * . Possible values include: 'Invalid', 'QuorumReplicas', 'AllReplicas' + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {number} quorumLossDuration The amount of time for which the - * partition will be kept in quorum loss. This must be specified in seconds. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46374,7 +67754,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46382,13 +67762,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback) { + getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46397,58 +67777,72 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, (err, result, request, response) => { + self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, quorumLossDuration, options, optionalCallback); + return self._getApplicationsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary 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. + * @summary Gets a Service-related events. * + * The response is list of ServiceEvent objects. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getQuorumLossProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + getServiceEventListWithHttpOperationResponse(serviceId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46459,31 +67853,45 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary 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. + * @summary Gets a Service-related events. * + * The response is list of ServiceEvent objects. * * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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 + * full name of the service without the 'fabric:' URI scheme. + * 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. * - * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46495,7 +67903,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionQuorumLossProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46503,15 +67911,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionQuorumLossProgress} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback) { + getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46520,71 +67926,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getQuorumLossProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getQuorumLossProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. + * @summary Gets all Services-related events. * - * This API is useful for testing failover. + * The response is list of ServiceEvent objects. * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} restartPartitionMode - Invalid - Reserved. Do not pass into - * API. - * - AllReplicasOrInstances - All replicas or instances in the partition are - * restarted at once. - * - OnlyActiveSecondaries - Only the secondary replicas are restarted. - * . Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startPartitionRestartWithHttpOperationResponse(serviceId, partitionId, operationId, restartPartitionMode, options) { + getServicesEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { + self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46595,44 +67993,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary This API will restart some or all replicas or instances of the - * specified partition. + * @summary Gets all Services-related events. * - * This API is useful for testing failover. + * The response is list of ServiceEvent objects. * - * If used to target a stateless service partition, RestartPartitionMode must - * be AllReplicasOrInstances. + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * Call the GetPartitionRestartProgress API using the same OperationId to get - * the progress. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {object} [options] Optional Parameters. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {uuid} partitionId The identity of the partition. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {string} restartPartitionMode - Invalid - Reserved. Do not pass into - * API. - * - AllReplicasOrInstances - All replicas or instances in the partition are - * restarted at once. - * - OnlyActiveSecondaries - Only the secondary replicas are restarted. - * . Possible values include: 'Invalid', 'AllReplicasOrInstances', - * 'OnlyActiveSecondaries' * - * @param {object} [options] Optional Parameters. + * @param {boolean} [options.skipCorrelationLookup] 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. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46644,7 +68034,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46652,13 +68042,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback) { + getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46667,58 +68057,65 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, (err, result, request, response) => { + self._getServicesEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startPartitionRestart(serviceId, partitionId, operationId, restartPartitionMode, options, optionalCallback); + return self._getServicesEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. + * @summary Gets a Partition-related events. * - * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * The response is list of PartitionEvent objects. * * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getPartitionRestartProgressWithHttpOperationResponse(serviceId, partitionId, operationId, options) { + getPartitionEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46729,31 +68126,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of a PartitionRestart operation started using - * StartPartitionRestart. - * - * Gets the progress of a PartitionRestart started with StartPartitionRestart - * using the provided OperationId. - * + * @summary Gets a Partition-related events. * - * @param {string} serviceId The identity of the service. This is typically the - * full name of the service without the 'fabric:' URI scheme. 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. + * The response is list of PartitionEvent objects. * * @param {uuid} partitionId The identity of the partition. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46765,7 +68169,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {PartitionRestartProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46773,15 +68177,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PartitionRestartProgress} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback) { + getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46790,71 +68192,63 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, (err, result, request, response) => { + self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getPartitionRestartProgress(serviceId, partitionId, operationId, options, optionalCallback); + return self._getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Starts or stops a cluster node. + * @summary Gets all Partitions-related events. * - * 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. + * The response is list of PartitionEvent objects. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} nodeName The name of the node. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {object} [options] Optional Parameters. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. - * - Invalid - Reserved. Do not pass into API. - * - Start - Transition a stopped node to up. - * - Stop - Transition an up node to stopped. - * . Possible values include: 'Invalid', 'Start', 'Stop' + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {number} stopDurationInSeconds 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. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - startNodeTransitionWithHttpOperationResponse(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options) { + getPartitionsEventListWithHttpOperationResponse(startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { + self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46865,44 +68259,36 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Starts or stops a cluster node. + * @summary Gets all Partitions-related events. * - * 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. + * The response is list of PartitionEvent objects. * + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {string} nodeName The name of the node. + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {object} [options] Optional Parameters. * - * @param {string} nodeTransitionType Indicates the type of transition to - * perform. NodeTransitionType.Start will start a stopped node. - * NodeTransitionType.Stop will stop a node that is up. - * - Invalid - Reserved. Do not pass into API. - * - Start - Transition a stopped node to up. - * - Stop - Transition an up node to stopped. - * . Possible values include: 'Invalid', 'Start', 'Stop' + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * - * @param {string} nodeInstanceId The node instance ID of the target node. - * This can be determined through GetNodeInfo API. + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. * - * @param {number} stopDurationInSeconds 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. + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. * - * @param {object} [options] Optional Parameters. * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -46914,7 +68300,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -46922,13 +68308,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback) { + getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -46937,51 +68323,67 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, (err, result, request, response) => { + self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._startNodeTransition(nodeName, operationId, nodeTransitionType, nodeInstanceId, stopDurationInSeconds, options, optionalCallback); + return self._getPartitionsEventList(startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Gets a Partition Replica-related events. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {string} nodeName The name of the node. + * @param {string} replicaId The identifier of the replica. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getNodeTransitionProgressWithHttpOperationResponse(nodeName, operationId, options) { + getPartitionReplicaEventListWithHttpOperationResponse(partitionId, replicaId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { + self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -46992,24 +68394,40 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets the progress of an operation started using - * StartNodeTransition. + * @summary Gets a Partition Replica-related events. * - * Gets the progress of an operation started with StartNodeTransition using the - * provided OperationId. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {string} nodeName The name of the node. + * @param {string} replicaId The identifier of the replica. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. + * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -47021,7 +68439,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {NodeTransitionProgress} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47029,15 +68447,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link NodeTransitionProgress} for more - * information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getNodeTransitionProgress(nodeName, operationId, options, optionalCallback) { + getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47046,49 +68462,50 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getNodeTransitionProgress(nodeName, operationId, options, (err, result, request, response) => { + self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getNodeTransitionProgress(nodeName, operationId, options, optionalCallback); + return self._getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. - * - * Gets the a list of user-induced fault operations filtered by provided input. + * @summary Gets all Replicas-related events for a Partition. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {number} stateFilter 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 + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -47099,11 +68516,11 @@ class ServiceFabricClient extends ServiceClient { * * @reject {Error} - The error object. */ - getFaultOperationListWithHttpOperationResponse(typeFilter, stateFilter, options) { + getPartitionReplicasEventListWithHttpOperationResponse(partitionId, startTimeUtc, endTimeUtc, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { + self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47114,37 +68531,38 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Gets a list of user-induced fault operations filtered by provided - * input. - * - * Gets the a list of user-induced fault operations filtered by provided input. + * @summary Gets all Replicas-related events for a Partition. * - * @param {number} typeFilter Used to filter on OperationType for user-induced - * operations. - * 65535 - select all - * 1 - select PartitionDataLoss. - * 2 - select PartitionQuorumLoss. - * 4 - select PartitionRestart. - * 8 - select NodeTransition. + * The response is list of ReplicaEvent objects. * + * @param {uuid} partitionId The identity of the partition. * - * @param {number} stateFilter 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 + * @param {string} startTimeUtc The start time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * + * @param {string} endTimeUtc The end time of a lookup query in ISO UTC + * yyyy-MM-ddTHH:mm:ssZ. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {string} [options.eventsTypesFilter] This is a comma separated string + * specifying the types of FabricEvents that should only be included in the + * response. + * + * @param {boolean} [options.excludeAnalysisEvents] This param disables the + * retrieval of AnalysisEvents if true is passed. + * + * + * @param {boolean} [options.skipCorrelationLookup] 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. + * * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -47170,7 +68588,7 @@ class ServiceFabricClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getFaultOperationList(typeFilter, stateFilter, options, optionalCallback) { + getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47179,76 +68597,45 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getFaultOperationList(typeFilter, stateFilter, options, (err, result, request, response) => { + self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getFaultOperationList(typeFilter, stateFilter, options, optionalCallback); + return self._getPartitionReplicasEventList(partitionId, startTimeUtc, endTimeUtc, options, optionalCallback); } } /** - * @summary Cancels a user-induced fault operation. - * - * The following is a list of APIs that start fault operations that may be - * cancelled using CancelOperation - - * - StartDataLoss - * - StartQuorumLoss - * - StartPartitionRestart - * - StartNodeTransition - * - * 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/is be - * 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. + * @summary Gets all correlated events for a given event. * + * The response is list of FabricEvents. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API - * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - cancelOperationWithHttpOperationResponse(operationId, force, options) { + getCorrelatedEventListWithHttpOperationResponse(eventInstanceId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._cancelOperation(operationId, force, options, (err, result, request, response) => { + self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -47259,49 +68646,18 @@ class ServiceFabricClient extends ServiceClient { } /** - * @summary Cancels a user-induced fault operation. - * - * The following is a list of APIs that start fault operations that may be - * cancelled using CancelOperation - - * - StartDataLoss - * - StartQuorumLoss - * - StartPartitionRestart - * - StartNodeTransition - * - * 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/is be - * 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. + * @summary Gets all correlated events for a given event. * + * The response is list of FabricEvents. * - * @param {uuid} operationId A GUID that identifies a call of this API. This - * is passed into the corresponding GetProgress API - * - * @param {boolean} force Indicates whether to gracefully rollback and clean up - * internal system state modified by executing the user-induced operation. + * @param {string} eventInstanceId The EventInstanceId. * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This specifies the time duration that the client is - * willing to wait for the requested operation to complete. The default value - * for this parameter is 60 seconds. + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -47313,7 +68669,7 @@ class ServiceFabricClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -47321,13 +68677,13 @@ class ServiceFabricClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - cancelOperation(operationId, force, options, optionalCallback) { + getCorrelatedEventList(eventInstanceId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -47336,17 +68692,20 @@ class ServiceFabricClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._cancelOperation(operationId, force, options, (err, result, request, response) => { + self._getCorrelatedEventList(eventInstanceId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._cancelOperation(operationId, force, options, optionalCallback); + return self._getCorrelatedEventList(eventInstanceId, options, optionalCallback); } } } module.exports = ServiceFabricClient; +module.exports['default'] = ServiceFabricClient; +module.exports.ServiceFabricClient = ServiceFabricClient; +module.exports.ServiceFabricModels = models; diff --git a/lib/services/serviceFabric/package.json b/lib/services/serviceFabric/package.json index 7958e623e2..41ea7fb5fb 100644 --- a/lib/services/serviceFabric/package.json +++ b/lib/services/serviceFabric/package.json @@ -1,35 +1,21 @@ { "name": "azure-servicefabric", "author": "Microsoft Corporation", - "contributors": [ - "Chen, Jeffrey " - ], + "description": "ServiceFabricClient Library with typescript type definitions for node", "version": "2.0.0-preview", - "description": "Microsoft Azure Service Fabric Client for node", - "tags": [ - "azure", - "sdk" - ], - "keywords": [ - "node", - "azure" - ], - "main": "./lib/serviceFabricClient.js", - "types": "./lib/serviceFabricClient.d.ts", - "license": "MIT", "dependencies": { - "ms-rest": "^2.2.2", - "ms-rest-azure": "^2.3.3" + "ms-rest": "^2.3.2" }, - "homepage": "http://github.com/Azure/azure-sdk-for-node", + "keywords": [ "node", "azure" ], + "license": "MIT", + "main": "./lib/serviceFabricClient.js", + "types": "./lib/serviceFabricClient.d.ts", + "homepage": "http://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-node.git" + "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { "url": "http://github.com/Azure/azure-sdk-for-node/issues" - }, - "scripts": { - "test": "npm -s run-script jshint" } } From 0c7c9d4874479bad0b67e6c882ba6dbfab0c721f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 18 Apr 2018 01:09:48 +0000 Subject: [PATCH 2/4] Generated from 9ceed58fbab00d8902f075bda8fa948e27a99c0f fix the bugs in the specification and examples as surfaced by the example validation --- .../serviceFabric/lib/models/backupEpoch.js | 70 ++++++++++ .../serviceFabric/lib/models/backupInfo.js | 8 +- .../lib/models/backupProgressInfo.js | 8 +- .../chaosRemoveReplicaFaultCompletedEvent.js | 2 +- .../chaosRemoveReplicaFaultScheduledEvent.js | 2 +- .../chaosRestartReplicaFaultScheduledEvent.js | 2 +- .../serviceFabric/lib/models/folderInfo.js | 4 +- .../serviceFabric/lib/models/index.d.ts | 120 +++++++++++------- .../serviceFabric/lib/models/index.js | 3 +- .../serviceFabric/lib/models/replicaEvent.js | 4 +- .../lib/models/restoreProgressInfo.js | 6 +- .../lib/models/serviceTypeDescription.js | 17 +++ .../lib/models/serviceTypeInfo.js | 2 + ...statefulReplicaHealthReportCreatedEvent.js | 2 +- ...statefulReplicaHealthReportExpiredEvent.js | 2 +- .../models/statefulServiceTypeDescription.js | 15 +++ ...tatelessReplicaHealthReportCreatedEvent.js | 2 +- ...tatelessReplicaHealthReportExpiredEvent.js | 2 +- .../models/statelessServiceTypeDescription.js | 15 +++ .../timeBasedBackupScheduleDescription.js | 3 +- ...ormInt64RangePartitionSchemeDescription.js | 4 +- .../serviceFabric/lib/serviceFabricClient.js | 29 +---- 22 files changed, 228 insertions(+), 94 deletions(-) create mode 100644 lib/services/serviceFabric/lib/models/backupEpoch.js diff --git a/lib/services/serviceFabric/lib/models/backupEpoch.js b/lib/services/serviceFabric/lib/models/backupEpoch.js new file mode 100644 index 0000000000..58e2b4585a --- /dev/null +++ b/lib/services/serviceFabric/lib/models/backupEpoch.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * 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. + * + * + */ +class BackupEpoch { + /** + * Create a BackupEpoch. + * @member {string} [configurationNumber] 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. + * @member {string} [dataLossNumber] The current dataloss 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. + */ + constructor() { + } + + /** + * Defines the metadata of BackupEpoch + * + * @returns {object} metadata of BackupEpoch + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupEpoch', + type: { + name: 'Composite', + className: 'BackupEpoch', + modelProperties: { + configurationNumber: { + required: false, + serializedName: 'ConfigurationNumber', + type: { + name: 'String' + } + }, + dataLossNumber: { + required: false, + serializedName: 'DataLossNumber', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupEpoch; diff --git a/lib/services/serviceFabric/lib/models/backupInfo.js b/lib/services/serviceFabric/lib/models/backupInfo.js index c206038141..25effef909 100644 --- a/lib/services/serviceFabric/lib/models/backupInfo.js +++ b/lib/services/serviceFabric/lib/models/backupInfo.js @@ -43,11 +43,11 @@ class BackupInfo { * . Possible values include: 'Invalid', 'Full', 'Incremental' * @member {object} [epochOfLastBackupRecord] Epoch of the last record in * this backup. - * @member {string} [epochOfLastBackupRecord.configurationVersion] The - * current configuration number of this Epoch. The configuration number is an + * @member {string} [epochOfLastBackupRecord.configurationNumber] 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. - * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * @member {string} [epochOfLastBackupRecord.dataLossNumber] The current * dataloss 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 @@ -289,7 +289,7 @@ class BackupInfo { serializedName: 'EpochOfLastBackupRecord', type: { name: 'Composite', - className: 'Epoch' + className: 'BackupEpoch' } }, lsnOfLastBackupRecord: { diff --git a/lib/services/serviceFabric/lib/models/backupProgressInfo.js b/lib/services/serviceFabric/lib/models/backupProgressInfo.js index 2bb6bccee2..a33deffb2f 100644 --- a/lib/services/serviceFabric/lib/models/backupProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/backupProgressInfo.js @@ -30,11 +30,11 @@ class BackupProgressInfo { * of the newly created backup. * @member {object} [epochOfLastBackupRecord] Specifies the epoch of the last * record included in backup. - * @member {string} [epochOfLastBackupRecord.configurationVersion] The - * current configuration number of this Epoch. The configuration number is an + * @member {string} [epochOfLastBackupRecord.configurationNumber] 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. - * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * @member {string} [epochOfLastBackupRecord.dataLossNumber] The current * dataloss 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 @@ -248,7 +248,7 @@ class BackupProgressInfo { serializedName: 'EpochOfLastBackupRecord', type: { name: 'Composite', - className: 'Epoch' + className: 'BackupEpoch' } }, lsnOfLastBackupRecord: { diff --git a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js index b640220691..d2f959882e 100644 --- a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultCompletedEvent.js @@ -87,7 +87,7 @@ class ChaosRemoveReplicaFaultCompletedEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, faultGroupId: { diff --git a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js index ee3755705c..2c52d3fc36 100644 --- a/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosRemoveReplicaFaultScheduledEvent.js @@ -87,7 +87,7 @@ class ChaosRemoveReplicaFaultScheduledEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, faultGroupId: { diff --git a/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js b/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js index e154807476..aa0a7e71f2 100644 --- a/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js +++ b/lib/services/serviceFabric/lib/models/chaosRestartReplicaFaultScheduledEvent.js @@ -87,7 +87,7 @@ class ChaosRestartReplicaFaultScheduledEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, faultGroupId: { diff --git a/lib/services/serviceFabric/lib/models/folderInfo.js b/lib/services/serviceFabric/lib/models/folderInfo.js index eea9433797..7e8bbfe572 100644 --- a/lib/services/serviceFabric/lib/models/folderInfo.js +++ b/lib/services/serviceFabric/lib/models/folderInfo.js @@ -20,7 +20,7 @@ class FolderInfo { * Create a FolderInfo. * @member {string} [storeRelativePath] The remote location within image * store. This path is relative to the image store root. - * @member {number} [fileCount] The number of files from within the image + * @member {string} [fileCount] The number of files from within the image * store folder. */ constructor() { @@ -51,7 +51,7 @@ class FolderInfo { required: false, serializedName: 'FileCount', type: { - name: 'Number' + name: 'String' } } } diff --git a/lib/services/serviceFabric/lib/models/index.d.ts b/lib/services/serviceFabric/lib/models/index.d.ts index 9388765f08..a6de59411a 100644 --- a/lib/services/serviceFabric/lib/models/index.d.ts +++ b/lib/services/serviceFabric/lib/models/index.d.ts @@ -3160,6 +3160,30 @@ export interface Epoch { dataLossVersion?: string; } +/** + * @class + * Initializes a new instance of the BackupEpoch class. + * @constructor + * 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. + * + * + * @member {string} [configurationNumber] 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. + * @member {string} [dataLossNumber] The current dataloss 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. + */ +export interface BackupEpoch { + configurationNumber?: string; + dataLossNumber?: string; +} + /** * @class * Initializes a new instance of the EventHealthEvaluation class. @@ -4823,7 +4847,7 @@ export interface PartitionsHealthEvaluation extends HealthEvaluation { * created. The partition ID is unique and does not change for the lifetime of * the service. If the same service was deleted and recreated the IDs of its * partitions would be different. - * @member {string} replicaId Id of a stateful service replica. ReplicaId is + * @member {number} replicaId 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 @@ -4833,7 +4857,7 @@ export interface PartitionsHealthEvaluation extends HealthEvaluation { */ export interface ReplicaEvent extends FabricEvent { partitionId: string; - replicaId: string; + replicaId: number; } /** @@ -5167,6 +5191,35 @@ export interface ServicesHealthEvaluation extends HealthEvaluation { unhealthyEvaluations?: HealthEvaluationWrapper[]; } +/** + * @class + * Initializes a new instance of the ServiceLoadMetricDescription class. + * @constructor + * Specifies a metric to load balance a service during runtime. + * + * @member {string} name 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. + * @member {string} [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' + * @member {number} [primaryDefaultLoad] 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. + * @member {number} [secondaryDefaultLoad] 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. + * @member {number} [defaultLoad] Used only for Stateless services. The default + * amount of load, as a number, that this service creates for this metric. + */ +export interface ServiceLoadMetricDescription { + name: string; + weight?: string; + primaryDefaultLoad?: number; + secondaryDefaultLoad?: number; + defaultLoad?: number; +} + /** * @class * Initializes a new instance of the ServiceTypeExtensionDescription class. @@ -5195,6 +5248,8 @@ export interface ServiceTypeExtensionDescription { * the service manifest. * @member {string} [placementConstraints] The placement constraint to be used * when instantiating this service in a Service Fabric cluster. + * @member {array} [loadMetrics] The service load metrics is given as an array + * of ServiceLoadMetricDescription objects. * @member {array} [servicePlacementPolicies] List of service placement policy * descriptions. * @member {array} [extensions] List of service type extensions. @@ -5204,6 +5259,7 @@ export interface ServiceTypeDescription { isStateful?: boolean; serviceTypeName?: string; placementConstraints?: string; + loadMetrics?: ServiceLoadMetricDescription[]; servicePlacementPolicies?: ServicePlacementPolicyDescription[]; extensions?: ServiceTypeExtensionDescription[]; kind: string; @@ -5228,6 +5284,8 @@ export interface ServiceTypeDescription { * @member {string} [serviceTypeDescription.placementConstraints] The placement * constraint to be used when instantiating this service in a Service Fabric * cluster. + * @member {array} [serviceTypeDescription.loadMetrics] The service load + * metrics is given as an array of ServiceLoadMetricDescription objects. * @member {array} [serviceTypeDescription.servicePlacementPolicies] List of * service placement policy descriptions. * @member {array} [serviceTypeDescription.extensions] List of service type @@ -7964,35 +8022,6 @@ export interface ServiceCorrelationDescription { serviceName: string; } -/** - * @class - * Initializes a new instance of the ServiceLoadMetricDescription class. - * @constructor - * Specifies a metric to load balance a service during runtime. - * - * @member {string} name 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. - * @member {string} [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' - * @member {number} [primaryDefaultLoad] 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. - * @member {number} [secondaryDefaultLoad] 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. - * @member {number} [defaultLoad] Used only for Stateless services. The default - * amount of load, as a number, that this service creates for this metric. - */ -export interface ServiceLoadMetricDescription { - name: string; - weight?: string; - primaryDefaultLoad?: number; - secondaryDefaultLoad?: number; - defaultLoad?: number; -} - /** * @class * Initializes a new instance of the PartitionSchemeDescription class. @@ -8041,10 +8070,10 @@ export interface SingletonPartitionSchemeDescription extends PartitionSchemeDesc * @member {number} count The number of partitions. * @member {string} lowKey String indicating the lower bound of the partition * key range that - * should be split between the partition ‘Count’ + * should be split between the partitions. * @member {string} highKey String indicating the upper bound of the partition * key range that - * should be split between the partition ‘Count’ + * should be split between the partitions. */ export interface UniformInt64RangePartitionSchemeDescription extends PartitionSchemeDescription { count: number; @@ -8922,12 +8951,12 @@ export interface FileInfo { * * @member {string} [storeRelativePath] The remote location within image store. * This path is relative to the image store root. - * @member {number} [fileCount] The number of files from within the image store + * @member {string} [fileCount] The number of files from within the image store * folder. */ export interface FolderInfo { storeRelativePath?: string; - fileCount?: number; + fileCount?: string; } /** @@ -10163,11 +10192,11 @@ export interface RestorePartitionDescription { * @member {date} [timeStampUtc] Timestamp when operation succeeded or failed. * @member {object} [restoredEpoch] Describes the epoch at which the partition * is restored. - * @member {string} [restoredEpoch.configurationVersion] The current + * @member {string} [restoredEpoch.configurationNumber] 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. - * @member {string} [restoredEpoch.dataLossVersion] The current dataloss number + * @member {string} [restoredEpoch.dataLossNumber] The current dataloss 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. @@ -10328,7 +10357,7 @@ export interface RestorePartitionDescription { export interface RestoreProgressInfo { restoreState?: string; timeStampUtc?: Date; - restoredEpoch?: Epoch; + restoredEpoch?: BackupEpoch; restoredLsn?: string; failureError?: FabricErrorError; } @@ -10379,11 +10408,11 @@ export interface BackupPartitionDescription { * . Possible values include: 'Invalid', 'Full', 'Incremental' * @member {object} [epochOfLastBackupRecord] Epoch of the last record in this * backup. - * @member {string} [epochOfLastBackupRecord.configurationVersion] The current + * @member {string} [epochOfLastBackupRecord.configurationNumber] 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. - * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * @member {string} [epochOfLastBackupRecord.dataLossNumber] The current * dataloss 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 @@ -10552,7 +10581,7 @@ export interface BackupInfo { partitionInformation?: PartitionInformation; backupLocation?: string; backupType?: string; - epochOfLastBackupRecord?: Epoch; + epochOfLastBackupRecord?: BackupEpoch; lsnOfLastBackupRecord?: string; creationTimeUtc?: Date; failureError?: FabricErrorError; @@ -10650,7 +10679,8 @@ export interface FrequencyBasedBackupScheduleDescription extends BackupScheduleD * is weekly. * @member {array} runTimes 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. + * specified along with time will be ignored.In the examples, date is also + * specified with time but the date will always be ignored. */ export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescription { scheduleFrequencyType: string; @@ -10675,11 +10705,11 @@ export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescri * the newly created backup. * @member {object} [epochOfLastBackupRecord] Specifies the epoch of the last * record included in backup. - * @member {string} [epochOfLastBackupRecord.configurationVersion] The current + * @member {string} [epochOfLastBackupRecord.configurationNumber] 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. - * @member {string} [epochOfLastBackupRecord.dataLossVersion] The current + * @member {string} [epochOfLastBackupRecord.dataLossNumber] The current * dataloss 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 @@ -10844,7 +10874,7 @@ export interface BackupProgressInfo { timeStampUtc?: Date; backupId?: string; backupLocation?: string; - epochOfLastBackupRecord?: Epoch; + epochOfLastBackupRecord?: BackupEpoch; lsnOfLastBackupRecord?: string; failureError?: FabricErrorError; } diff --git a/lib/services/serviceFabric/lib/models/index.js b/lib/services/serviceFabric/lib/models/index.js index 8b389bc759..38ea820849 100644 --- a/lib/services/serviceFabric/lib/models/index.js +++ b/lib/services/serviceFabric/lib/models/index.js @@ -110,6 +110,7 @@ exports.HealthStateCount = require('./healthStateCount'); exports.EntityKindHealthStateCount = require('./entityKindHealthStateCount'); exports.HealthStatistics = require('./healthStatistics'); exports.Epoch = require('./epoch'); +exports.BackupEpoch = require('./backupEpoch'); exports.EventHealthEvaluation = require('./eventHealthEvaluation'); exports.FabricCodeVersionInfo = require('./fabricCodeVersionInfo'); exports.FabricConfigVersionInfo = require('./fabricConfigVersionInfo'); @@ -176,6 +177,7 @@ exports.ServicePlacementPreferPrimaryDomainPolicyDescription = require('./servic exports.ServicePlacementRequiredDomainPolicyDescription = require('./servicePlacementRequiredDomainPolicyDescription'); exports.ServicePlacementRequireDomainDistributionPolicyDescription = require('./servicePlacementRequireDomainDistributionPolicyDescription'); exports.ServicesHealthEvaluation = require('./servicesHealthEvaluation'); +exports.ServiceLoadMetricDescription = require('./serviceLoadMetricDescription'); exports.ServiceTypeExtensionDescription = require('./serviceTypeExtensionDescription'); exports.ServiceTypeDescription = require('./serviceTypeDescription'); exports.ServiceTypeInfo = require('./serviceTypeInfo'); @@ -243,7 +245,6 @@ exports.PagedComposeDeploymentStatusInfoList = require('./pagedComposeDeployment exports.CreateComposeDeploymentDescription = require('./createComposeDeploymentDescription'); exports.DeployedServicePackageInfo = require('./deployedServicePackageInfo'); exports.ServiceCorrelationDescription = require('./serviceCorrelationDescription'); -exports.ServiceLoadMetricDescription = require('./serviceLoadMetricDescription'); exports.PartitionSchemeDescription = require('./partitionSchemeDescription'); exports.NamedPartitionSchemeDescription = require('./namedPartitionSchemeDescription'); exports.SingletonPartitionSchemeDescription = require('./singletonPartitionSchemeDescription'); diff --git a/lib/services/serviceFabric/lib/models/replicaEvent.js b/lib/services/serviceFabric/lib/models/replicaEvent.js index ef65c8cb3b..5dddbddf1f 100644 --- a/lib/services/serviceFabric/lib/models/replicaEvent.js +++ b/lib/services/serviceFabric/lib/models/replicaEvent.js @@ -25,7 +25,7 @@ class ReplicaEvent extends models['FabricEvent'] { * service was created. The partition ID is unique and does not change for * the lifetime of the service. If the same service was deleted and recreated * the IDs of its partitions would be different. - * @member {string} replicaId Id of a stateful service replica. ReplicaId is + * @member {number} replicaId 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 @@ -96,7 +96,7 @@ class ReplicaEvent extends models['FabricEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } } } diff --git a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js index 10bab0009c..4b8e4ca9bb 100644 --- a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js @@ -27,11 +27,11 @@ class RestoreProgressInfo { * failed. * @member {object} [restoredEpoch] Describes the epoch at which the * partition is restored. - * @member {string} [restoredEpoch.configurationVersion] The current + * @member {string} [restoredEpoch.configurationNumber] 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. - * @member {string} [restoredEpoch.dataLossVersion] The current dataloss + * @member {string} [restoredEpoch.dataLossNumber] The current dataloss * 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. @@ -229,7 +229,7 @@ class RestoreProgressInfo { serializedName: 'RestoredEpoch', type: { name: 'Composite', - className: 'Epoch' + className: 'BackupEpoch' } }, restoredLsn: { diff --git a/lib/services/serviceFabric/lib/models/serviceTypeDescription.js b/lib/services/serviceFabric/lib/models/serviceTypeDescription.js index 215279f9a6..980774fd27 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeDescription.js @@ -27,6 +27,8 @@ class ServiceTypeDescription { * in the service manifest. * @member {string} [placementConstraints] The placement constraint to be * used when instantiating this service in a Service Fabric cluster. + * @member {array} [loadMetrics] The service load metrics is given as an + * array of ServiceLoadMetricDescription objects. * @member {array} [servicePlacementPolicies] List of service placement * policy descriptions. * @member {array} [extensions] List of service type extensions. @@ -75,6 +77,21 @@ class ServiceTypeDescription { name: 'String' } }, + loadMetrics: { + required: false, + serializedName: 'LoadMetrics', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceLoadMetricDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceLoadMetricDescription' + } + } + } + }, servicePlacementPolicies: { required: false, serializedName: 'ServicePlacementPolicies', diff --git a/lib/services/serviceFabric/lib/models/serviceTypeInfo.js b/lib/services/serviceFabric/lib/models/serviceTypeInfo.js index 8d2e0b719f..e69b49ba58 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeInfo.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeInfo.js @@ -32,6 +32,8 @@ class ServiceTypeInfo { * @member {string} [serviceTypeDescription.placementConstraints] The * placement constraint to be used when instantiating this service in a * Service Fabric cluster. + * @member {array} [serviceTypeDescription.loadMetrics] The service load + * metrics is given as an array of ServiceLoadMetricDescription objects. * @member {array} [serviceTypeDescription.servicePlacementPolicies] List of * service placement policy descriptions. * @member {array} [serviceTypeDescription.extensions] List of service type diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js index 4364973a9e..c935d5aa3a 100644 --- a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js +++ b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportCreatedEvent.js @@ -93,7 +93,7 @@ class StatefulReplicaHealthReportCreatedEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, replicaInstanceId: { diff --git a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js index e7800a339a..924b50773b 100644 --- a/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/statefulReplicaHealthReportExpiredEvent.js @@ -93,7 +93,7 @@ class StatefulReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, replicaInstanceId: { diff --git a/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js b/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js index 3ce3ba9741..a7790210eb 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceTypeDescription.js @@ -69,6 +69,21 @@ class StatefulServiceTypeDescription extends models['ServiceTypeDescription'] { name: 'String' } }, + loadMetrics: { + required: false, + serializedName: 'LoadMetrics', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceLoadMetricDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceLoadMetricDescription' + } + } + } + }, servicePlacementPolicies: { required: false, serializedName: 'ServicePlacementPolicies', diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js index 55de8b43d9..0c59c03bde 100644 --- a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js +++ b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportCreatedEvent.js @@ -92,7 +92,7 @@ class StatelessReplicaHealthReportCreatedEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, sourceId: { diff --git a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js index 27990ae1ee..6b9232a954 100644 --- a/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js +++ b/lib/services/serviceFabric/lib/models/statelessReplicaHealthReportExpiredEvent.js @@ -92,7 +92,7 @@ class StatelessReplicaHealthReportExpiredEvent extends models['ReplicaEvent'] { required: true, serializedName: 'ReplicaId', type: { - name: 'String' + name: 'Number' } }, sourceId: { diff --git a/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js b/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js index ed72bd8b4f..035c44f18c 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceTypeDescription.js @@ -70,6 +70,21 @@ class StatelessServiceTypeDescription extends models['ServiceTypeDescription'] { name: 'String' } }, + loadMetrics: { + required: false, + serializedName: 'LoadMetrics', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceLoadMetricDescriptionElementType', + type: { + name: 'Composite', + className: 'ServiceLoadMetricDescription' + } + } + } + }, servicePlacementPolicies: { required: false, serializedName: 'ServicePlacementPolicies', diff --git a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js index 11ef33811a..49a2a5f679 100644 --- a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js +++ b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js @@ -28,7 +28,8 @@ class TimeBasedBackupScheduleDescription extends models['BackupScheduleDescripti * type is weekly. * @member {array} runTimes 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. + * Date specified along with time will be ignored.In the examples, date is + * also specified with time but the date will always be ignored. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js b/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js index 0fea7502e1..aa85b0616e 100644 --- a/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js +++ b/lib/services/serviceFabric/lib/models/uniformInt64RangePartitionSchemeDescription.js @@ -24,10 +24,10 @@ class UniformInt64RangePartitionSchemeDescription extends models['PartitionSchem * @member {number} count The number of partitions. * @member {string} lowKey String indicating the lower bound of the partition * key range that - * should be split between the partition ‘Count’ + * should be split between the partitions. * @member {string} highKey String indicating the upper bound of the * partition key range that - * should be split between the partition ‘Count’ + * should be split between the partitions. */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.js b/lib/services/serviceFabric/lib/serviceFabricClient.js index 2408da7ee9..3dc167bd91 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.js +++ b/lib/services/serviceFabric/lib/serviceFabricClient.js @@ -6906,7 +6906,7 @@ function _getServiceTypeInfoList(applicationTypeName, applicationTypeVersion, op return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 404) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -7087,7 +7087,7 @@ function _getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204 && statusCode !== 404) { + if (statusCode !== 200 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -7133,23 +7133,6 @@ function _getServiceTypeInfoByName(applicationTypeName, applicationTypeVersion, return callback(deserializationError); } } - // Deserialize Response - if (statusCode === 204) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ServiceTypeInfo']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError1.request = msRest.stripRequest(httpRequest); - deserializationError1.response = msRest.stripResponse(response); - return callback(deserializationError1); - } - } return callback(null, result, httpRequest, response); }); @@ -30699,7 +30682,7 @@ function _suspendServiceBackup(serviceId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -30839,7 +30822,7 @@ function _resumeServiceBackup(serviceId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -31610,7 +31593,7 @@ function _suspendPartitionBackup(partitionId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -31743,7 +31726,7 @@ function _resumePartitionBackup(partitionId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); From 41a1498425dea7c1b22fbd5e293c8081614e8009 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 18 Apr 2018 23:57:07 +0000 Subject: [PATCH 3/4] Generated from dff9557eeb14fa3ed9b82e8dcfa1312a2b67a4ab example updates --- lib/services/serviceFabric/lib/models/index.d.ts | 3 +-- .../lib/models/timeBasedBackupScheduleDescription.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/services/serviceFabric/lib/models/index.d.ts b/lib/services/serviceFabric/lib/models/index.d.ts index a6de59411a..0cc36547a1 100644 --- a/lib/services/serviceFabric/lib/models/index.d.ts +++ b/lib/services/serviceFabric/lib/models/index.d.ts @@ -10679,8 +10679,7 @@ export interface FrequencyBasedBackupScheduleDescription extends BackupScheduleD * is weekly. * @member {array} runTimes 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.In the examples, date is also - * specified with time but the date will always be ignored. + * specified along with time will be ignored. */ export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescription { scheduleFrequencyType: string; diff --git a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js index 49a2a5f679..11ef33811a 100644 --- a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js +++ b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js @@ -28,8 +28,7 @@ class TimeBasedBackupScheduleDescription extends models['BackupScheduleDescripti * type is weekly. * @member {array} runTimes 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.In the examples, date is - * also specified with time but the date will always be ignored. + * Date specified along with time will be ignored. */ constructor() { super(); From 0e1de0120d3a09622ad0b7a2817c00b52ac7ea51 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 20 Apr 2018 19:37:20 +0000 Subject: [PATCH 4/4] Generated from 813b94529da22628561e9a804adb53710d08e967 remove newlines from the end of the description --- .../models/applicationCapacityDescription.js | 1 - .../lib/models/applicationHealthPolicies.js | 1 - .../lib/models/applicationHealthPolicy.js | 4 +- .../models/applicationHealthPolicyMapItem.js | 1 - .../lib/models/applicationHealthState.js | 1 - .../lib/models/applicationHealthStateChunk.js | 1 - .../models/applicationHealthStateChunkList.js | 1 - .../models/applicationHealthStateFilter.js | 4 +- .../lib/models/applicationInfo.js | 8 +- .../models/applicationMetricDescription.js | 1 - .../applicationTypeHealthPolicyMapItem.js | 1 - .../lib/models/applicationTypeInfo.js | 11 +- .../models/applicationUpgradeDescription.js | 3 +- .../models/applicationUpgradeProgressInfo.js | 3 +- .../applicationUpgradeUpdateDescription.js | 3 +- .../lib/models/backupConfigurationInfo.js | 10 +- .../serviceFabric/lib/models/backupEpoch.js | 1 - .../serviceFabric/lib/models/backupInfo.js | 8 +- .../lib/models/backupProgressInfo.js | 9 +- .../lib/models/backupSuspensionInfo.js | 6 +- .../serviceFabric/lib/models/chaos.js | 10 +- .../serviceFabric/lib/models/chaosContext.js | 1 - .../lib/models/chaosEventsSegment.js | 1 - .../lib/models/chaosParameters.js | 20 +- .../models/chaosParametersDictionaryItem.js | 1 - .../serviceFabric/lib/models/chaosSchedule.js | 6 +- .../lib/models/chaosTargetFilter.js | 1 - .../checkExistsPropertyBatchOperation.js | 1 - .../checkSequencePropertyBatchOperation.js | 1 - .../checkValuePropertyBatchOperation.js | 1 - .../serviceFabric/lib/models/clusterHealth.js | 1 - .../lib/models/clusterHealthChunk.js | 5 +- .../lib/models/clusterHealthPolicy.js | 7 +- .../models/clusterUpgradeDescriptionObject.js | 3 +- .../models/clusterUpgradeProgressObject.js | 3 +- .../composeDeploymentUpgradeDescription.js | 3 +- .../composeDeploymentUpgradeProgressInfo.js | 6 +- .../createComposeDeploymentDescription.js | 1 - .../models/deactivationIntentDescription.js | 4 +- .../models/deletePropertyBatchOperation.js | 1 - .../models/deltaNodesCheckHealthEvaluation.js | 1 - .../deployServicePackageToNodeDescription.js | 1 - .../deployedApplicationHealthEvaluation.js | 1 - .../deployedApplicationHealthStateChunk.js | 1 - ...deployedApplicationHealthStateChunkList.js | 1 - .../deployedApplicationHealthStateFilter.js | 4 +- .../lib/models/deployedApplicationInfo.js | 6 +- .../deployedApplicationsHealthEvaluation.js | 1 - .../lib/models/deployedCodePackageInfo.js | 6 +- .../deployedServicePackageHealthStateChunk.js | 1 - ...loyedServicePackageHealthStateChunkList.js | 1 - ...deployedServicePackageHealthStateFilter.js | 4 +- .../lib/models/deployedServicePackageInfo.js | 6 +- .../serviceFabric/lib/models/entityHealth.js | 5 +- .../serviceFabric/lib/models/epoch.js | 1 - .../lib/models/eventHealthEvaluation.js | 1 - .../serviceFabric/lib/models/fabricError.js | 5 +- .../lib/models/fabricErrorError.js | 4 +- .../lib/models/getPropertyBatchOperation.js | 4 +- .../serviceFabric/lib/models/healthEvent.js | 1 - .../lib/models/healthInformation.js | 1 - .../lib/models/healthStateCount.js | 1 - .../lib/models/healthStatistics.js | 1 - .../serviceFabric/lib/models/index.d.ts | 313 +--- .../lib/models/monitoringPolicyDescription.js | 3 +- .../lib/models/nodeHealthStateChunk.js | 1 - .../lib/models/nodeHealthStateChunkList.js | 1 - .../lib/models/nodeHealthStateFilter.js | 4 +- .../serviceFabric/lib/models/nodeImpact.js | 1 - .../lib/models/nodeRepairImpactDescription.js | 1 - .../lib/models/nodeRepairTargetDescription.js | 1 - .../lib/models/nodeTransitionProgress.js | 1 - .../pagedDeployedApplicationInfoList.js | 1 - .../lib/models/partitionHealthStateChunk.js | 1 - .../models/partitionHealthStateChunkList.js | 1 - .../lib/models/partitionHealthStateFilter.js | 4 +- .../lib/models/partitionLoadInformation.js | 1 - .../lib/models/putPropertyBatchOperation.js | 1 - .../lib/models/remoteReplicatorStatus.js | 1 - .../lib/models/repairImpactDescriptionBase.js | 1 - .../lib/models/repairTargetDescriptionBase.js | 1 - .../serviceFabric/lib/models/repairTask.js | 1 - .../models/repairTaskApproveDescription.js | 1 - .../lib/models/repairTaskCancelDescription.js | 1 - .../lib/models/repairTaskDeleteDescription.js | 1 - .../lib/models/repairTaskHistory.js | 1 - ...repairTaskUpdateHealthPolicyDescription.js | 1 - .../lib/models/repairTaskUpdateInfo.js | 1 - .../serviceFabric/lib/models/replicaHealth.js | 1 - .../lib/models/replicaHealthStateChunk.js | 1 - .../lib/models/replicaHealthStateChunkList.js | 1 - .../lib/models/replicaHealthStateFilter.js | 4 +- .../lib/models/replicatorQueueStatus.js | 1 - .../lib/models/replicatorStatus.js | 1 - .../restartDeployedCodePackageDescription.js | 1 - .../lib/models/restoreProgressInfo.js | 9 +- .../models/rollingUpgradeUpdateDescription.js | 3 +- .../models/serviceFromTemplateDescription.js | 1 - .../lib/models/serviceHealthStateChunk.js | 1 - .../lib/models/serviceHealthStateChunkList.js | 1 - .../lib/models/serviceHealthStateFilter.js | 4 +- ...nPartiallyPlaceServicePolicyDescription.js | 1 - ...entPreferPrimaryDomainPolicyDescription.js | 1 - ...uireDomainDistributionPolicyDescription.js | 1 - .../lib/models/serviceTypeHealthPolicy.js | 10 +- .../models/serviceTypeHealthPolicyMapItem.js | 1 - .../models/startClusterUpgradeDescription.js | 3 +- .../models/statefulServiceReplicaHealth.js | 1 - .../models/statelessServiceInstanceHealth.js | 1 - .../lib/models/testErrorChaosEvent.js | 1 - .../timeBasedBackupScheduleDescription.js | 4 +- .../models/updateClusterUpgradeDescription.js | 3 +- ...deDomainDeltaNodesCheckHealthEvaluation.js | 1 - .../lib/serviceFabricClient.d.ts | 814 +-------- .../serviceFabric/lib/serviceFabricClient.js | 1609 +++-------------- 115 files changed, 400 insertions(+), 2638 deletions(-) diff --git a/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js b/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js index 4e497a5990..2c50d3f202 100644 --- a/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationCapacityDescription.js @@ -21,7 +21,6 @@ const models = require('./index'); * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * */ class ApplicationCapacityDescription { /** diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js index 04c141cffd..f310e244e3 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicies.js @@ -16,7 +16,6 @@ const models = require('./index'); * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * */ class ApplicationHealthPolicies { /** diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js index 40b89deeb3..fb5a42f638 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicy.js @@ -16,7 +16,6 @@ const models = require('./index'); * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * */ class ApplicationHealthPolicy { /** @@ -33,8 +32,7 @@ class ApplicationHealthPolicy { * 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 . + * nodes. Default percentage is zero. Default value: 0 . * @member {object} [defaultServiceTypeHealthPolicy] The health policy used * by default to evaluate the health of a service type. * @member {number} diff --git a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js index 37822466de..1dfa46747d 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthPolicyMapItem.js @@ -15,7 +15,6 @@ const models = require('./index'); /** * Defines an item in ApplicationHealthPolicyMap. * - * */ class ApplicationHealthPolicyMapItem { /** diff --git a/lib/services/serviceFabric/lib/models/applicationHealthState.js b/lib/services/serviceFabric/lib/models/applicationHealthState.js index 757358f881..bcd0181cdd 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthState.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthState.js @@ -16,7 +16,6 @@ const models = require('./index'); * Represents the health state of an application, which contains the * application identifier and the aggregated health state. * - * * @extends models['EntityHealthState'] */ class ApplicationHealthState extends models['EntityHealthState'] { diff --git a/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js b/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js index f583313177..f401c2eea1 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthStateChunk.js @@ -18,7 +18,6 @@ const models = require('./index'); * aggregated health state and any children services and deployed applications * that respect the filters in cluster health chunk query description. * - * * @extends models['EntityHealthStateChunk'] */ class ApplicationHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/applicationHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/applicationHealthStateChunkList.js index 48f0037a0b..522a185604 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthStateChunkList.js @@ -17,7 +17,6 @@ const models = require('./index'); * input filters in the chunk query. Returned by get cluster health state * chunks query. * - * * @extends models['EntityHealthStateChunkList'] */ class ApplicationHealthStateChunkList extends models['EntityHealthStateChunkList'] { diff --git a/lib/services/serviceFabric/lib/models/applicationHealthStateFilter.js b/lib/services/serviceFabric/lib/models/applicationHealthStateFilter.js index d6591ca0fa..b38058a9a0 100644 --- a/lib/services/serviceFabric/lib/models/applicationHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/applicationHealthStateFilter.js @@ -18,7 +18,6 @@ const models = require('./index'); * One filter can match zero, one or multiple applications, depending on its * properties. * - * */ class ApplicationHealthStateFilter { /** @@ -66,8 +65,7 @@ class ApplicationHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [serviceFilters] 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 diff --git a/lib/services/serviceFabric/lib/models/applicationInfo.js b/lib/services/serviceFabric/lib/models/applicationInfo.js index f747e6bcac..a1f2775cc5 100644 --- a/lib/services/serviceFabric/lib/models/applicationInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationInfo.js @@ -32,9 +32,8 @@ class ApplicationInfo { * application manifest. * @member {string} [typeVersion] The version of the application type as * defined in the application manifest. - * @member {string} [status] The status of the application. - * . Possible values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', - * 'Deleting', 'Failed' + * @member {string} [status] The status of the application. Possible values + * include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' * @member {array} [parameters] List of application parameters with * overridden values from their default values specified in the application * manifest. @@ -42,8 +41,7 @@ class ApplicationInfo { * such as Cluster, Node, Application, Service, Partition, Replica etc. * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {string} [applicationDefinitionKind] The mechanism used to define - * a Service Fabric application. - * . Possible values include: 'Invalid', + * a Service Fabric application. Possible values include: 'Invalid', * 'ServiceFabricApplicationDescription', 'Compose' */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/applicationMetricDescription.js b/lib/services/serviceFabric/lib/models/applicationMetricDescription.js index 245e2e4586..7bd3095da3 100644 --- a/lib/services/serviceFabric/lib/models/applicationMetricDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationMetricDescription.js @@ -15,7 +15,6 @@ * can be used to limit the total consumption of this metric by the services of * this application. * - * */ class ApplicationMetricDescription { /** diff --git a/lib/services/serviceFabric/lib/models/applicationTypeHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/applicationTypeHealthPolicyMapItem.js index 556c46d4a8..05e0facfa3 100644 --- a/lib/services/serviceFabric/lib/models/applicationTypeHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/applicationTypeHealthPolicyMapItem.js @@ -13,7 +13,6 @@ /** * Defines an item in ApplicationTypeHealthPolicyMap. * - * */ class ApplicationTypeHealthPolicyMapItem { /** diff --git a/lib/services/serviceFabric/lib/models/applicationTypeInfo.js b/lib/services/serviceFabric/lib/models/applicationTypeInfo.js index bee3d77da5..61ca6f8d54 100644 --- a/lib/services/serviceFabric/lib/models/applicationTypeInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationTypeInfo.js @@ -25,15 +25,14 @@ class ApplicationTypeInfo { * in the application manifest. * @member {array} [defaultParameterList] List of application type parameters * that can be overridden when creating or updating the application. - * @member {string} [status] The status of the application type. - * . Possible values include: 'Invalid', 'Provisioning', 'Available', - * 'Unprovisioning', 'Failed' + * @member {string} [status] The status of the application type. Possible + * values include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + * 'Failed' * @member {string} [statusDetails] Additional detailed information about the * status of the application type. * @member {string} [applicationTypeDefinitionKind] The mechanism used to - * define a Service Fabric application type. - * . Possible values include: 'Invalid', 'ServiceFabricApplicationPackage', - * 'Compose' + * define a Service Fabric application type. Possible values include: + * 'Invalid', 'ServiceFabricApplicationPackage', 'Compose' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js index 334bb7f0f2..ef143a165e 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeDescription.js @@ -59,8 +59,7 @@ class ApplicationUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js index 36a91f94a1..50be9e16e7 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeProgressInfo.js @@ -83,8 +83,7 @@ class ApplicationUpgradeProgressInfo { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before diff --git a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js index c2cc4604c1..907c15007f 100644 --- a/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/applicationUpgradeUpdateDescription.js @@ -108,8 +108,7 @@ class ApplicationUpgradeUpdateDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js b/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js index 33cbec8155..93829c1561 100644 --- a/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js +++ b/lib/services/serviceFabric/lib/models/backupConfigurationInfo.js @@ -22,16 +22,14 @@ class BackupConfigurationInfo { * @member {string} [policyName] The name of the backup policy which is * applicable to this Service Fabric application or service or partition. * @member {string} [policyInheritedFrom] Specifies the scope at which the - * backup policy is applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', - * 'Application' + * backup policy is applied. Possible values include: 'Invalid', 'Partition', + * 'Service', 'Application' * @member {object} [suspensionInfo] Describes the backup suspension details. * @member {boolean} [suspensionInfo.isSuspended] Indicates whether periodic * backup is suspended at this level or not. * @member {string} [suspensionInfo.suspensionInheritedFrom] Specifies the - * scope at which the backup suspension was applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', - * 'Application' + * scope at which the backup suspension was applied. Possible values include: + * 'Invalid', 'Partition', 'Service', 'Application' * @member {string} kind Polymorphic Discriminator */ constructor() { diff --git a/lib/services/serviceFabric/lib/models/backupEpoch.js b/lib/services/serviceFabric/lib/models/backupEpoch.js index 58e2b4585a..4aeeeb44e8 100644 --- a/lib/services/serviceFabric/lib/models/backupEpoch.js +++ b/lib/services/serviceFabric/lib/models/backupEpoch.js @@ -17,7 +17,6 @@ * replica are said to be a new Epoch from the ones which were sent by the old * Primary replica. * - * */ class BackupEpoch { /** diff --git a/lib/services/serviceFabric/lib/models/backupInfo.js b/lib/services/serviceFabric/lib/models/backupInfo.js index 25effef909..6d502273f4 100644 --- a/lib/services/serviceFabric/lib/models/backupInfo.js +++ b/lib/services/serviceFabric/lib/models/backupInfo.js @@ -39,8 +39,8 @@ class BackupInfo { * @member {string} [backupLocation] Location of the backup, relative to the * backup store. * @member {string} [backupType] Describes the type of backup, whether its - * full or incremental. - * . Possible values include: 'Invalid', 'Full', 'Incremental' + * full or incremental. Possible values include: 'Invalid', 'Full', + * 'Incremental' * @member {object} [epochOfLastBackupRecord] Epoch of the last record in * this backup. * @member {string} [epochOfLastBackupRecord.configurationNumber] The current @@ -157,8 +157,8 @@ class BackupInfo { * Timeout) * - "FABRIC_E_COMMUNICATION_ERROR" * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT" - * . Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * - "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', diff --git a/lib/services/serviceFabric/lib/models/backupProgressInfo.js b/lib/services/serviceFabric/lib/models/backupProgressInfo.js index a33deffb2f..673be2a559 100644 --- a/lib/services/serviceFabric/lib/models/backupProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/backupProgressInfo.js @@ -20,9 +20,8 @@ class BackupProgressInfo { /** * Create a BackupProgressInfo. * @member {string} [backupState] Represents the current state of the - * partition backup operation. - * . Possible values include: 'Invalid', 'Accepted', 'BackupInProgress', - * 'Success', 'Failure', 'Timeout' + * partition backup operation. Possible values include: 'Invalid', + * 'Accepted', 'BackupInProgress', 'Success', 'Failure', 'Timeout' * @member {date} [timeStampUtc] TimeStamp in UTC when operation succeeded or * failed. * @member {uuid} [backupId] Unique ID of the newly created backup. @@ -143,8 +142,8 @@ class BackupProgressInfo { * Timeout) * - "FABRIC_E_COMMUNICATION_ERROR" * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT" - * . Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * - "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', diff --git a/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js b/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js index 0ffe751a2f..24eddbbd20 100644 --- a/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js +++ b/lib/services/serviceFabric/lib/models/backupSuspensionInfo.js @@ -13,7 +13,6 @@ /** * Describes the backup suspension details. * - * */ class BackupSuspensionInfo { /** @@ -21,9 +20,8 @@ class BackupSuspensionInfo { * @member {boolean} [isSuspended] Indicates whether periodic backup is * suspended at this level or not. * @member {string} [suspensionInheritedFrom] Specifies the scope at which - * the backup suspension was applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', - * 'Application' + * the backup suspension was applied. Possible values include: 'Invalid', + * 'Partition', 'Service', 'Application' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/chaos.js b/lib/services/serviceFabric/lib/models/chaos.js index 757573431c..0e46009a92 100644 --- a/lib/services/serviceFabric/lib/models/chaos.js +++ b/lib/services/serviceFabric/lib/models/chaos.js @@ -15,7 +15,6 @@ const models = require('./index'); /** * Contains a description of Chaos. * - * */ class Chaos { /** @@ -165,11 +164,10 @@ class Chaos { * At most 1000 application names can be included in this list, to increase * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. - * @member {string} [status] Current status of the Chaos run. - * . Possible values include: 'Invalid', 'Running', 'Stopped' - * @member {string} [scheduleStatus] Current status of the schedule. - * . Possible values include: 'Invalid', 'Stopped', 'Active', 'Expired', - * 'Pending' + * @member {string} [status] Current status of the Chaos run. Possible values + * include: 'Invalid', 'Running', 'Stopped' + * @member {string} [scheduleStatus] Current status of the schedule. Possible + * values include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/chaosContext.js b/lib/services/serviceFabric/lib/models/chaosContext.js index 7380bb9554..756ee2b62f 100644 --- a/lib/services/serviceFabric/lib/models/chaosContext.js +++ b/lib/services/serviceFabric/lib/models/chaosContext.js @@ -18,7 +18,6 @@ * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * */ class ChaosContext { /** diff --git a/lib/services/serviceFabric/lib/models/chaosEventsSegment.js b/lib/services/serviceFabric/lib/models/chaosEventsSegment.js index f06319dd44..0cd616a348 100644 --- a/lib/services/serviceFabric/lib/models/chaosEventsSegment.js +++ b/lib/services/serviceFabric/lib/models/chaosEventsSegment.js @@ -16,7 +16,6 @@ const models = require('./index'); * Contains the list of Chaos events and the continuation token to get the next * segment. * - * */ class ChaosEventsSegment { /** diff --git a/lib/services/serviceFabric/lib/models/chaosParameters.js b/lib/services/serviceFabric/lib/models/chaosParameters.js index 70a450fbcd..9891eca5f2 100644 --- a/lib/services/serviceFabric/lib/models/chaosParameters.js +++ b/lib/services/serviceFabric/lib/models/chaosParameters.js @@ -15,23 +15,20 @@ const models = require('./index'); /** * Defines all the parameters to configure a Chaos run. * - * */ class ChaosParameters { /** * Create a ChaosParameters. * @member {string} [timeToRunInSeconds] 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' . + * 4,294,967,295 (System.UInt32.MaxValue). Default value: '4294967295' . * @member {number} [maxClusterStabilizationTimeoutInSeconds] 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 . + * failed event. Default value: 60 . * @member {number} [maxConcurrentFaults] MaxConcurrentFaults is the maximum * number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated @@ -39,22 +36,19 @@ class ChaosParameters { * The higher the concurrency, the more aggressive the injection of faults -- * 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 . + * caution while moving up. Default value: 1 . * @member {boolean} [enableMoveReplicaFaults] Enables or disables the move - * primary and move secondary faults. - * . Default value: true . + * primary and move secondary faults. Default value: true . * @member {number} [waitTimeBetweenFaultsInSeconds] 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 . + * caution while moving up. Default value: 20 . * @member {number} [waitTimeBetweenIterationsInSeconds] Time-separation (in * seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. - * . Default value: 30 . + * The larger the value, the lower the fault injection rate. Default value: + * 30 . * @member {object} [clusterHealthPolicy] 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 diff --git a/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js b/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js index ae6c8d634f..35cb380e96 100644 --- a/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js +++ b/lib/services/serviceFabric/lib/models/chaosParametersDictionaryItem.js @@ -15,7 +15,6 @@ const models = require('./index'); /** * Defines an item in ChaosParametersDictionary of the Chaos Schedule. * - * */ class ChaosParametersDictionaryItem { /** diff --git a/lib/services/serviceFabric/lib/models/chaosSchedule.js b/lib/services/serviceFabric/lib/models/chaosSchedule.js index 34218305a4..8d5e07019c 100644 --- a/lib/services/serviceFabric/lib/models/chaosSchedule.js +++ b/lib/services/serviceFabric/lib/models/chaosSchedule.js @@ -20,11 +20,9 @@ class ChaosSchedule { /** * Create a ChaosSchedule. * @member {date} [startDate] The date and time Chaos will start using this - * schedule. - * . Default value: new Date('1601-01-01T00:00:00Z') . + * schedule. Default value: new Date('1601-01-01T00:00:00Z') . * @member {date} [expiryDate] The date and time Chaos will continue to use - * this schedule until. - * . Default value: new Date('9999-12-31T23:59:59.999Z') . + * this schedule until. Default value: new Date('9999-12-31T23:59:59.999Z') . * @member {array} [chaosParametersDictionary] A mapping of string names to * Chaos Parameters to be referenced by Chaos Schedule Jobs. * @member {array} [jobs] A list of all Chaos Schedule Jobs that will be diff --git a/lib/services/serviceFabric/lib/models/chaosTargetFilter.js b/lib/services/serviceFabric/lib/models/chaosTargetFilter.js index 0ce5f29fdf..a6f8ef0926 100644 --- a/lib/services/serviceFabric/lib/models/chaosTargetFilter.js +++ b/lib/services/serviceFabric/lib/models/chaosTargetFilter.js @@ -30,7 +30,6 @@ * in NodeTypeInclusionList. If both NodeTypeInclusionList and * ApplicationInclusionList are null or empty, an ArgumentException is thrown. * - * */ class ChaosTargetFilter { /** diff --git a/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js index babdcb4571..9a68de6cd3 100644 --- a/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/checkExistsPropertyBatchOperation.js @@ -22,7 +22,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class CheckExistsPropertyBatchOperation extends models['PropertyBatchOperation'] { diff --git a/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js index 88720aa606..c5c1baf7b1 100644 --- a/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/checkSequencePropertyBatchOperation.js @@ -23,7 +23,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class CheckSequencePropertyBatchOperation extends models['PropertyBatchOperation'] { diff --git a/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js index 43ee0f4884..c7a3657f03 100644 --- a/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/checkValuePropertyBatchOperation.js @@ -20,7 +20,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class CheckValuePropertyBatchOperation extends models['PropertyBatchOperation'] { diff --git a/lib/services/serviceFabric/lib/models/clusterHealth.js b/lib/services/serviceFabric/lib/models/clusterHealth.js index 6b5630e79d..6c7f170f8f 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealth.js +++ b/lib/services/serviceFabric/lib/models/clusterHealth.js @@ -18,7 +18,6 @@ const models = require('./index'); * node health states as well as the health events and the unhealthy * evaluations. * - * * @extends models['EntityHealth'] */ class ClusterHealth extends models['EntityHealth'] { diff --git a/lib/services/serviceFabric/lib/models/clusterHealthChunk.js b/lib/services/serviceFabric/lib/models/clusterHealthChunk.js index 0419754c82..5d2f77e6c5 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthChunk.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthChunk.js @@ -17,7 +17,6 @@ const models = require('./index'); * Contains the cluster aggregated health state, and the cluster entities that * respect the input filter. * - * */ class ClusterHealthChunk { /** @@ -27,8 +26,8 @@ class ClusterHealthChunk { * 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' + * the application health policies. Possible values include: 'Invalid', 'Ok', + * 'Warning', 'Error', 'Unknown' * @member {object} [nodeHealthStateChunks] The list of node health state * chunks in the cluster that respect the filters in the cluster health chunk * query description. diff --git a/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js b/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js index 1f1382e6cc..5e86f8ef07 100644 --- a/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/clusterHealthPolicy.js @@ -16,7 +16,6 @@ const models = require('./index'); * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * */ class ClusterHealthPolicy { /** @@ -37,8 +36,7 @@ class ClusterHealthPolicy { * 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 . + * this percentage should be configured to tolerate that. Default value: 0 . * @member {number} [maxPercentUnhealthyApplications] 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 @@ -53,8 +51,7 @@ class ClusterHealthPolicy { * 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 . + * applications. Default percentage is zero. Default value: 0 . * @member {array} [applicationTypeHealthPolicyMap] 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 diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js b/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js index c8afe33f93..3efa7d764f 100644 --- a/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeDescriptionObject.js @@ -52,8 +52,7 @@ class ClusterUpgradeDescriptionObject { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js b/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js index 2b25bea060..c69ac6e2ea 100644 --- a/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js +++ b/lib/services/serviceFabric/lib/models/clusterUpgradeProgressObject.js @@ -71,8 +71,7 @@ class ClusterUpgradeProgressObject { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js index b01b415b91..819d5f51f5 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeDescription.js @@ -56,8 +56,7 @@ class ComposeDeploymentUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js index d63d616ad9..710f5afe3e 100644 --- a/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/composeDeploymentUpgradeProgressInfo.js @@ -23,8 +23,7 @@ class ComposeDeploymentUpgradeProgressInfo { * @member {string} [applicationName] The name of the target application, * including the 'fabric:' URI scheme. * @member {string} [upgradeState] The state of the compose deployment - * upgrade. - * . Possible values include: 'Invalid', 'ProvisioningTarget', + * upgrade. Possible values include: 'Invalid', 'ProvisioningTarget', * 'RollingForwardInProgress', 'RollingForwardPending', * 'UnprovisioningCurrent', 'RollingForwardCompleted', * 'RollingBackInProgress', 'UnprovisioningTarget', 'RollingBackCompleted', @@ -57,8 +56,7 @@ class ComposeDeploymentUpgradeProgressInfo { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js b/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js index 8692d3e676..ee2000dad0 100644 --- a/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js +++ b/lib/services/serviceFabric/lib/models/createComposeDeploymentDescription.js @@ -15,7 +15,6 @@ const models = require('./index'); /** * Defines description for creating a Service Fabric compose deployment. * - * */ class CreateComposeDeploymentDescription { /** diff --git a/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js b/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js index 8f93d84d12..d46ab60f5e 100644 --- a/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js +++ b/lib/services/serviceFabric/lib/models/deactivationIntentDescription.js @@ -18,8 +18,8 @@ class DeactivationIntentDescription { /** * Create a DeactivationIntentDescription. * @member {string} [deactivationIntent] Describes the intent or reason for - * deactivating the node. The possible values are following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * deactivating the node. The possible values are following. Possible values + * include: 'Pause', 'Restart', 'RemoveData' */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js index 39c7cd485f..e3f22deff3 100644 --- a/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/deletePropertyBatchOperation.js @@ -18,7 +18,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class DeletePropertyBatchOperation extends models['PropertyBatchOperation'] { diff --git a/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js index ed15e9acec..7709e7988a 100644 --- a/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deltaNodesCheckHealthEvaluation.js @@ -18,7 +18,6 @@ const models = require('./index'); * Can be returned during cluster upgrade when the aggregated health state of * the cluster is Warning or Error. * - * * @extends models['HealthEvaluation'] */ class DeltaNodesCheckHealthEvaluation extends models['HealthEvaluation'] { diff --git a/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js b/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js index 397c25189f..b5f1d45553 100644 --- a/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js +++ b/lib/services/serviceFabric/lib/models/deployServicePackageToNodeDescription.js @@ -16,7 +16,6 @@ const models = require('./index'); * Defines description for downloading packages associated with a service * manifest to image cache on a Service Fabric node. * - * */ class DeployServicePackageToNodeDescription { /** diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js index 82860d2eca..6005877235 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthEvaluation.js @@ -17,7 +17,6 @@ const models = require('./index'); * information about the data and the algorithm used by the health store to * evaluate health. * - * * @extends models['HealthEvaluation'] */ class DeployedApplicationHealthEvaluation extends models['HealthEvaluation'] { diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js index a72f8e42a0..1404ee6475 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunk.js @@ -18,7 +18,6 @@ const models = require('./index'); * any deployed service packages that respect the chunk query description * filters. * - * * @extends models['EntityHealthStateChunk'] */ class DeployedApplicationHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunkList.js index 7a42f1eb1d..35a8fbc044 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateChunkList.js @@ -17,7 +17,6 @@ const models = require('./index'); * filters in the chunk query. Returned by get cluster health state chunks * query. * - * */ class DeployedApplicationHealthStateChunkList { /** diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateFilter.js b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateFilter.js index 3fea4babe0..8591ba5790 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationHealthStateFilter.js @@ -20,7 +20,6 @@ const models = require('./index'); * One filter can match zero, one or multiple deployed applications, depending * on its properties. * - * */ class DeployedApplicationHealthStateFilter { /** @@ -62,8 +61,7 @@ class DeployedApplicationHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [deployedServicePackageFilters] 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 diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js b/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js index 15790cc4e4..9d89d8d637 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationInfo.js @@ -29,9 +29,9 @@ class DeployedApplicationInfo { * @member {string} [typeName] The application type name as defined in the * application manifest. * @member {string} [status] The status of the application deployed on the - * node. Following are the possible values. - * . Possible values include: 'Invalid', 'Downloading', 'Activating', - * 'Active', 'Upgrading', 'Deactivating' + * node. Following are the possible values. Possible values include: + * 'Invalid', 'Downloading', 'Activating', 'Active', 'Upgrading', + * 'Deactivating' * @member {string} [workDirectory] The work directory of the application on * the node. The work directory can be used to store application data. * @member {string} [logDirectory] The log directory of the application on diff --git a/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js b/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js index 2ef3825c87..69128a318a 100644 --- a/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/deployedApplicationsHealthEvaluation.js @@ -19,7 +19,6 @@ const models = require('./index'); * Can be returned when evaluating application health and the aggregated health * state is either Error or Warning. * - * * @extends models['HealthEvaluation'] */ class DeployedApplicationsHealthEvaluation extends models['HealthEvaluation'] { diff --git a/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js b/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js index e1f0d2dcad..4604d1816f 100644 --- a/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedCodePackageInfo.js @@ -39,9 +39,9 @@ class DeployedCodePackageInfo { * while importing service manifest. Possible values include: 'None', * 'Process', 'HyperV' * @member {string} [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' + * or service package on a Service Fabric node. Possible values include: + * 'Invalid', 'Downloading', 'Activating', 'Active', 'Upgrading', + * 'Deactivating' * @member {string} [runFrequencyInterval] The interval at which code package * is run. This is used for periodic code package. * @member {object} [setupEntryPoint] Information about setup or main entry diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js index d44f9e4c83..f0ba3783aa 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunk.js @@ -17,7 +17,6 @@ const models = require('./index'); * contains the service manifest name and the service package aggregated health * state. * - * * @extends models['EntityHealthStateChunk'] */ class DeployedServicePackageHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunkList.js index 61fdad93d5..20ef4e2a08 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateChunkList.js @@ -17,7 +17,6 @@ const models = require('./index'); * input filters in the chunk query. Returned by get cluster health state * chunks query. * - * */ class DeployedServicePackageHealthStateChunkList { /** diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js index d272e286cc..a65f37da4a 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageHealthStateFilter.js @@ -21,7 +21,6 @@ * One filter can match zero, one or multiple deployed service packages, * depending on its properties. * - * */ class DeployedServicePackageHealthStateFilter { /** @@ -70,8 +69,7 @@ class DeployedServicePackageHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js b/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js index 22ca65dd1c..7f1839e6fb 100644 --- a/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js +++ b/lib/services/serviceFabric/lib/models/deployedServicePackageInfo.js @@ -22,9 +22,9 @@ class DeployedServicePackageInfo { * @member {string} [version] The version of the service package specified in * service manifest. * @member {string} [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' + * or service package on a Service Fabric node. Possible values include: + * 'Invalid', 'Downloading', 'Activating', 'Active', 'Upgrading', + * 'Deactivating' * @member {string} [servicePackageActivationId] The ActivationId of a * deployed service package. If ServicePackageActivationMode specified at the * time of creating the service diff --git a/lib/services/serviceFabric/lib/models/entityHealth.js b/lib/services/serviceFabric/lib/models/entityHealth.js index f533f8e16c..8add5bd4b9 100644 --- a/lib/services/serviceFabric/lib/models/entityHealth.js +++ b/lib/services/serviceFabric/lib/models/entityHealth.js @@ -16,7 +16,6 @@ const models = require('./index'); * Health information common to all entities in the cluster. It contains the * aggregated health state, health events and unhealthy evaluation. * - * */ class EntityHealth { /** @@ -25,8 +24,8 @@ class EntityHealth { * 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' + * The aggregation is done by applying the desired health policy. Possible + * values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {array} [healthEvents] The list of health events reported on the * entity. * @member {array} [unhealthyEvaluations] The unhealthy evaluations that show diff --git a/lib/services/serviceFabric/lib/models/epoch.js b/lib/services/serviceFabric/lib/models/epoch.js index 28738ea73f..fbae64cfe6 100644 --- a/lib/services/serviceFabric/lib/models/epoch.js +++ b/lib/services/serviceFabric/lib/models/epoch.js @@ -17,7 +17,6 @@ * replica are said to be a new Epoch from the ones which were sent by the old * Primary replica. * - * */ class Epoch { /** diff --git a/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js b/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js index 948179ae85..347ee6b8fa 100644 --- a/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/eventHealthEvaluation.js @@ -18,7 +18,6 @@ const models = require('./index'); * The health evaluation is returned when evaluating health of an entity * results in Error or Warning. * - * * @extends models['HealthEvaluation'] */ class EventHealthEvaluation extends models['HealthEvaluation'] { diff --git a/lib/services/serviceFabric/lib/models/fabricError.js b/lib/services/serviceFabric/lib/models/fabricError.js index 12afc6a978..373d48c133 100644 --- a/lib/services/serviceFabric/lib/models/fabricError.js +++ b/lib/services/serviceFabric/lib/models/fabricError.js @@ -17,7 +17,6 @@ const models = require('./index'); * codes. This type defines the additional information returned from the * Service Fabric API operations that are not successful. * - * */ class FabricError { /** @@ -124,8 +123,8 @@ class FabricError { * Timeout) * - "FABRIC_E_COMMUNICATION_ERROR" * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT" - * . Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * - "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', diff --git a/lib/services/serviceFabric/lib/models/fabricErrorError.js b/lib/services/serviceFabric/lib/models/fabricErrorError.js index f5fe867df5..f6227fb0db 100644 --- a/lib/services/serviceFabric/lib/models/fabricErrorError.js +++ b/lib/services/serviceFabric/lib/models/fabricErrorError.js @@ -117,8 +117,8 @@ class FabricErrorError { * Timeout) * - "FABRIC_E_COMMUNICATION_ERROR" * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT" - * . Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * - "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', diff --git a/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js index f2b0b97d56..6b09399140 100644 --- a/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/getPropertyBatchOperation.js @@ -18,7 +18,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class GetPropertyBatchOperation extends models['PropertyBatchOperation'] { @@ -27,8 +26,7 @@ class GetPropertyBatchOperation extends models['PropertyBatchOperation'] { * @member {boolean} [includeValue] 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 . + * property metadata. Default value: false . */ constructor() { super(); diff --git a/lib/services/serviceFabric/lib/models/healthEvent.js b/lib/services/serviceFabric/lib/models/healthEvent.js index 8703299134..cd367ded46 100644 --- a/lib/services/serviceFabric/lib/models/healthEvent.js +++ b/lib/services/serviceFabric/lib/models/healthEvent.js @@ -16,7 +16,6 @@ const models = require('./index'); * Represents health information reported on a health entity, such as cluster, * application or node, with additional metadata added by the Health Manager. * - * * @extends models['HealthInformation'] */ class HealthEvent extends models['HealthInformation'] { diff --git a/lib/services/serviceFabric/lib/models/healthInformation.js b/lib/services/serviceFabric/lib/models/healthInformation.js index e1b33a06e3..2487f83830 100644 --- a/lib/services/serviceFabric/lib/models/healthInformation.js +++ b/lib/services/serviceFabric/lib/models/healthInformation.js @@ -15,7 +15,6 @@ * reports sent to health store and in all health events returned by health * queries. * - * */ class HealthInformation { /** diff --git a/lib/services/serviceFabric/lib/models/healthStateCount.js b/lib/services/serviceFabric/lib/models/healthStateCount.js index 1181728f0d..0ff5b722ed 100644 --- a/lib/services/serviceFabric/lib/models/healthStateCount.js +++ b/lib/services/serviceFabric/lib/models/healthStateCount.js @@ -14,7 +14,6 @@ * Represents information about how many health entities are in Ok, Warning and * Error health state. * - * */ class HealthStateCount { /** diff --git a/lib/services/serviceFabric/lib/models/healthStatistics.js b/lib/services/serviceFabric/lib/models/healthStatistics.js index 9ce21b7f8d..25d4d86dc0 100644 --- a/lib/services/serviceFabric/lib/models/healthStatistics.js +++ b/lib/services/serviceFabric/lib/models/healthStatistics.js @@ -22,7 +22,6 @@ const models = require('./index'); * applications and deployed service packages. * For partition, the health statistics include health counts for replicas. * - * */ class HealthStatistics { /** diff --git a/lib/services/serviceFabric/lib/models/index.d.ts b/lib/services/serviceFabric/lib/models/index.d.ts index 0cc36547a1..728b9d4663 100644 --- a/lib/services/serviceFabric/lib/models/index.d.ts +++ b/lib/services/serviceFabric/lib/models/index.d.ts @@ -161,13 +161,12 @@ export interface DeployedApplicationHealthState extends EntityHealthState { * Health information common to all entities in the cluster. It contains the * aggregated health state, health events and unhealthy evaluation. * - * * @member {string} [aggregatedHealthState] 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' + * The aggregation is done by applying the desired health policy. Possible + * values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {array} [healthEvents] The list of health events reported on the * entity. * @member {array} [unhealthyEvaluations] The unhealthy evaluations that show @@ -275,7 +274,6 @@ export interface ApplicationHealthEvaluation extends HealthEvaluation { * Represents the health policy used to evaluate the health of services * belonging to a service type. * - * * @member {number} [maxPercentUnhealthyPartitionsPerService] The maximum * allowed percentage of unhealthy partitions per service. Allowed values are * Byte values from zero to 100 @@ -287,8 +285,7 @@ export interface ApplicationHealthEvaluation extends HealthEvaluation { * 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 . + * partitions. Default percentage is zero. Default value: 0 . * @member {number} [maxPercentUnhealthyReplicasPerPartition] The maximum * allowed percentage of unhealthy replicas per partition. Allowed values are * Byte values from zero to 100. @@ -300,8 +297,7 @@ export interface ApplicationHealthEvaluation extends HealthEvaluation { * 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 . + * replicas. Default percentage is zero. Default value: 0 . * @member {number} [maxPercentUnhealthyServices] The maximum maximum allowed * percentage of unhealthy services. Allowed values are Byte values from zero * to 100. @@ -314,8 +310,7 @@ export interface ApplicationHealthEvaluation extends HealthEvaluation { * 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 . + * services. Default percentage is zero. Default value: 0 . */ export interface ServiceTypeHealthPolicy { maxPercentUnhealthyPartitionsPerService?: number; @@ -329,7 +324,6 @@ export interface ServiceTypeHealthPolicy { * @constructor * Defines an item in ServiceTypeHealthPolicyMap. * - * * @member {string} key The key of the service type health policy map item. * This is the name of the service type. * @member {object} value The value of the service type health policy map item. @@ -384,7 +378,6 @@ export interface ServiceTypeHealthPolicyMapItem { * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @member {boolean} [considerWarningAsError] Indicates whether warnings are * treated with the same severity as errors. Default value: false . * @member {number} [maxPercentUnhealthyDeployedApplications] The maximum @@ -397,8 +390,7 @@ export interface ServiceTypeHealthPolicyMapItem { * 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 . + * Default percentage is zero. Default value: 0 . * @member {object} [defaultServiceTypeHealthPolicy] The health policy used by * default to evaluate the health of a service type. * @member {number} @@ -457,7 +449,6 @@ export interface ApplicationHealthPolicy { * @constructor * Defines an item in ApplicationHealthPolicyMap. * - * * @member {string} key The key of the application health policy map item. This * is the name of the application. * @member {object} value The value of the application health policy map item. @@ -532,7 +523,6 @@ export interface ApplicationHealthPolicyMapItem { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @member {array} [applicationHealthPolicyMap] The wrapper that contains the * map with application health policies used to evaluate specific applications * in the cluster. @@ -548,7 +538,6 @@ export interface ApplicationHealthPolicies { * Represents the health state of an application, which contains the * application identifier and the aggregated health state. * - * * @member {string} [name] The name of the application, including the 'fabric:' * URI scheme. */ @@ -580,7 +569,6 @@ export interface EntityHealthStateChunk { * The replica health state contains the replica ID and its aggregated health * state. * - * * @member {string} [replicaOrInstanceId] 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 @@ -603,7 +591,6 @@ export interface ReplicaHealthStateChunk extends EntityHealthStateChunk { * The list of replica health state chunks that respect the input filters in * the chunk query. Returned by get cluster health state chunks query. * - * * @member {array} [items] The list of replica health state chunks that respect * the input filters in the chunk query. */ @@ -619,7 +606,6 @@ export interface ReplicaHealthStateChunkList { * partition ID, its aggregated health state and any replicas that respect the * filters in the cluster health chunk query description. * - * * @member {uuid} [partitionId] The Id of the partition. * @member {object} [replicaHealthStateChunks] The list of replica health state * chunks belonging to the partition that respect the filters in the cluster @@ -641,7 +627,6 @@ export interface PartitionHealthStateChunk extends EntityHealthStateChunk { * Returned by get cluster health state chunks query as part of the parent * application hierarchy. * - * * @member {array} [items] The list of partition health state chunks that * respect the input filters in the chunk query. */ @@ -657,7 +642,6 @@ export interface PartitionHealthStateChunkList { * name, its aggregated health state and any partitions that respect the * filters in the cluster health chunk query description. * - * * @member {string} [serviceName] The name of the service whose health state * chunk is provided in this object. * @member {object} [partitionHealthStateChunks] The list of partition health @@ -678,7 +662,6 @@ export interface ServiceHealthStateChunk extends EntityHealthStateChunk { * The list of service health state chunks that respect the input filters in * the chunk query. Returned by get cluster health state chunks query. * - * * @member {array} [items] The list of service health state chunks that respect * the input filters in the chunk query. */ @@ -694,7 +677,6 @@ export interface ServiceHealthStateChunkList { * contains the service manifest name and the service package aggregated health * state. * - * * @member {string} [serviceManifestName] The name of the service manifest. * @member {string} [servicePackageActivationId] The ActivationId of a deployed * service package. If ServicePackageActivationMode specified at the time of @@ -716,7 +698,6 @@ export interface DeployedServicePackageHealthStateChunk extends EntityHealthStat * input filters in the chunk query. Returned by get cluster health state * chunks query. * - * * @member {array} [items] The list of deployed service package health state * chunks that respect the input filters in the chunk query. */ @@ -733,7 +714,6 @@ export interface DeployedServicePackageHealthStateChunkList { * any deployed service packages that respect the chunk query description * filters. * - * * @member {string} [nodeName] The name of node where the application is * deployed. * @member {object} [deployedServicePackageHealthStateChunks] The list of @@ -757,7 +737,6 @@ export interface DeployedApplicationHealthStateChunk extends EntityHealthStateCh * filters in the chunk query. Returned by get cluster health state chunks * query. * - * * @member {array} [items] The list of deployed application health state chunks * that respect the input filters in the chunk query. */ @@ -774,7 +753,6 @@ export interface DeployedApplicationHealthStateChunkList { * aggregated health state and any children services and deployed applications * that respect the filters in cluster health chunk query description. * - * * @member {string} [applicationName] The name of the application, including * the 'fabric:' URI scheme. * @member {string} [applicationTypeName] The application type name as defined @@ -821,7 +799,6 @@ export interface EntityHealthStateChunkList { * input filters in the chunk query. Returned by get cluster health state * chunks query. * - * * @member {array} [items] The list of application health state chunks that * respect the input filters in the chunk query. */ @@ -842,7 +819,6 @@ export interface ApplicationHealthStateChunkList extends EntityHealthStateChunkL * One filter can match zero, one or multiple replicas, depending on its * properties. * - * * @member {string} [replicaOrInstanceIdFilter] 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. @@ -876,8 +852,7 @@ export interface ApplicationHealthStateChunkList extends EntityHealthStateChunkL * - Error - Filter 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 . + * 65535. Default value: 0 . */ export interface ReplicaHealthStateFilter { replicaOrInstanceIdFilter?: string; @@ -896,7 +871,6 @@ export interface ReplicaHealthStateFilter { * One filter can match zero, one or multiple partitions, depending on its * properties. * - * * @member {uuid} [partitionIdFilter] 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 @@ -929,8 +903,7 @@ export interface ReplicaHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [replicaFilters] 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 @@ -960,7 +933,6 @@ export interface PartitionHealthStateFilter { * One filter can match zero, one or multiple services, depending on its * properties. * - * * @member {string} [serviceNameFilter] The name of the service that matches * the filter. The filter is applied only to the specified service, if it * exists. @@ -994,8 +966,7 @@ export interface PartitionHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [partitionFilters] 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 @@ -1028,7 +999,6 @@ export interface ServiceHealthStateFilter { * One filter can match zero, one or multiple deployed service packages, * depending on its properties. * - * * @member {string} [serviceManifestNameFilter] The name of the service * manifest which identifies the deployed service packages that matches the * filter. @@ -1071,8 +1041,7 @@ export interface ServiceHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . */ export interface DeployedServicePackageHealthStateFilter { serviceManifestNameFilter?: string; @@ -1091,7 +1060,6 @@ export interface DeployedServicePackageHealthStateFilter { * One filter can match zero, one or multiple deployed applications, depending * on its properties. * - * * @member {string} [nodeNameFilter] 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 @@ -1127,8 +1095,7 @@ export interface DeployedServicePackageHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [deployedServicePackageFilters] 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 @@ -1158,7 +1125,6 @@ export interface DeployedApplicationHealthStateFilter { * One filter can match zero, one or multiple applications, depending on its * properties. * - * * @member {string} [applicationNameFilter] 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. @@ -1201,8 +1167,7 @@ export interface DeployedApplicationHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [serviceFilters] 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 @@ -1268,18 +1233,16 @@ export interface ApplicationParameter { * application manifest. * @member {string} [typeVersion] The version of the application type as * defined in the application manifest. - * @member {string} [status] The status of the application. - * . Possible values include: 'Invalid', 'Ready', 'Upgrading', 'Creating', - * 'Deleting', 'Failed' + * @member {string} [status] The status of the application. Possible values + * include: 'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed' * @member {array} [parameters] List of application parameters with overridden * values from their default values specified in the application manifest. * @member {string} [healthState] The health state of a Service Fabric entity * such as Cluster, Node, Application, Service, Partition, Replica etc. * Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown' * @member {string} [applicationDefinitionKind] The mechanism used to define a - * Service Fabric application. - * . Possible values include: 'Invalid', 'ServiceFabricApplicationDescription', - * 'Compose' + * Service Fabric application. Possible values include: 'Invalid', + * 'ServiceFabricApplicationDescription', 'Compose' */ export interface ApplicationInfo { id?: string; @@ -1300,7 +1263,6 @@ export interface ApplicationInfo { * can be used to limit the total consumption of this metric by the services of * this application. * - * * @member {string} [name] The name of the metric. * @member {number} [maximumCapacity] The maximum node capacity for Service * Fabric application. @@ -1459,7 +1421,6 @@ export interface ApplicationTypeApplicationsHealthEvaluation extends HealthEvalu * @constructor * Defines an item in ApplicationTypeHealthPolicyMap. * - * * @member {string} key The key of the application type health policy map item. * This is the name of the application type. * @member {number} value The value of the application type health policy map @@ -1484,15 +1445,14 @@ export interface ApplicationTypeHealthPolicyMapItem { * the application manifest. * @member {array} [defaultParameterList] List of application type parameters * that can be overridden when creating or updating the application. - * @member {string} [status] The status of the application type. - * . Possible values include: 'Invalid', 'Provisioning', 'Available', - * 'Unprovisioning', 'Failed' + * @member {string} [status] The status of the application type. Possible + * values include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning', + * 'Failed' * @member {string} [statusDetails] Additional detailed information about the * status of the application type. * @member {string} [applicationTypeDefinitionKind] The mechanism used to - * define a Service Fabric application type. - * . Possible values include: 'Invalid', 'ServiceFabricApplicationPackage', - * 'Compose' + * define a Service Fabric application type. Possible values include: + * 'Invalid', 'ServiceFabricApplicationPackage', 'Compose' */ export interface ApplicationTypeInfo { name?: string; @@ -1549,8 +1509,7 @@ export interface ApplicationTypeManifest { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [healthCheckWaitDurationInMilliseconds] 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 @@ -1630,8 +1589,7 @@ export interface MonitoringPolicyDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -1892,8 +1850,7 @@ export interface FailureUpgradeDomainProgressInfo { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before @@ -2102,7 +2059,6 @@ export interface NodeHealthState extends EntityHealthState { * node health states as well as the health events and the unhealthy * evaluations. * - * * @member {array} [nodeHealthStates] Cluster node health states as found in * the health store. * @member {array} [applicationHealthStates] Cluster application health states @@ -2120,7 +2076,6 @@ export interface ClusterHealth extends EntityHealth { * Represents the health state chunk of a node, which contains the node name * and its aggregated health state. * - * * @member {string} [nodeName] The name of a Service Fabric node. */ export interface NodeHealthStateChunk extends EntityHealthStateChunk { @@ -2135,7 +2090,6 @@ export interface NodeHealthStateChunk extends EntityHealthStateChunk { * filters in the chunk query. Returned by get cluster health state chunks * query. * - * * @member {array} [items] The list of node health state chunks that respect * the input filters in the chunk query. */ @@ -2151,14 +2105,13 @@ export interface NodeHealthStateChunkList extends EntityHealthStateChunkList { * Contains the cluster aggregated health state, and the cluster entities that * respect the input filter. * - * * @member {string} [healthState] 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' + * the application health policies. Possible values include: 'Invalid', 'Ok', + * 'Warning', 'Error', 'Unknown' * @member {object} [nodeHealthStateChunks] The list of node health state * chunks in the cluster that respect the filters in the cluster health chunk * query description. @@ -2186,7 +2139,6 @@ export interface ClusterHealthChunk { * properties. * Can be specified in the cluster health chunk query description. * - * * @member {string} [nodeNameFilter] 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 @@ -2218,8 +2170,7 @@ export interface ClusterHealthChunk { * - Error - Filter 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 . + * 65535. Default value: 0 . */ export interface NodeHealthStateFilter { nodeNameFilter?: string; @@ -2233,7 +2184,6 @@ export interface NodeHealthStateFilter { * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @member {boolean} [considerWarningAsError] Indicates whether warnings are * treated with the same severity as errors. Default value: false . * @member {number} [maxPercentUnhealthyNodes] The maximum allowed percentage @@ -2250,8 +2200,7 @@ export interface NodeHealthStateFilter { * 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 . + * this percentage should be configured to tolerate that. Default value: 0 . * @member {number} [maxPercentUnhealthyApplications] 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. @@ -2265,8 +2214,7 @@ export interface NodeHealthStateFilter { * 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 . + * applications. Default percentage is zero. Default value: 0 . * @member {array} [applicationTypeHealthPolicyMap] 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 @@ -2557,8 +2505,8 @@ export interface ContainerInstanceEvent extends FabricEvent { * Describes the intent or reason for deactivating the node. * * @member {string} [deactivationIntent] Describes the intent or reason for - * deactivating the node. The possible values are following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * deactivating the node. The possible values are following. Possible values + * include: 'Pause', 'Restart', 'RemoveData' */ export interface DeactivationIntentDescription { deactivationIntent?: string; @@ -2573,7 +2521,6 @@ export interface DeactivationIntentDescription { * Can be returned during cluster upgrade when the aggregated health state of * the cluster is Warning or Error. * - * * @member {number} [baselineErrorCount] Number of nodes with aggregated heath * state Error in the health store at the beginning of the cluster upgrade. * @member {number} [baselineTotalCount] Total number of nodes in the health @@ -2650,7 +2597,6 @@ export interface DeployedApplicationHealth extends EntityHealth { * information about the data and the algorithm used by the health store to * evaluate health. * - * * @member {string} [nodeName] Name of the node where the application is * deployed to. * @member {string} [applicationName] The name of the application, including @@ -2684,9 +2630,8 @@ export interface DeployedApplicationHealthEvaluation extends HealthEvaluation { * @member {string} [typeName] The application type name as defined in the * application manifest. * @member {string} [status] The status of the application deployed on the - * node. Following are the possible values. - * . Possible values include: 'Invalid', 'Downloading', 'Activating', 'Active', - * 'Upgrading', 'Deactivating' + * node. Following are the possible values. Possible values include: 'Invalid', + * 'Downloading', 'Activating', 'Active', 'Upgrading', 'Deactivating' * @member {string} [workDirectory] The work directory of the application on * the node. The work directory can be used to store application data. * @member {string} [logDirectory] The log directory of the application on the @@ -2719,7 +2664,6 @@ export interface DeployedApplicationInfo { * Can be returned when evaluating application health and the aggregated health * state is either Error or Warning. * - * * @member {number} [maxPercentUnhealthyDeployedApplications] Maximum allowed * percentage of unhealthy deployed applications from the * ApplicationHealthPolicy. @@ -2940,7 +2884,6 @@ export interface DeployedStatelessServiceInstanceInfo extends DeployedServiceRep * reports sent to health store and in all health events returned by health * queries. * - * * @member {string} sourceId The source name which identifies the * client/watchdog/system component which generated the health information. * @member {string} property The property of the health information. An entity @@ -3017,7 +2960,6 @@ export interface HealthInformation { * Represents health information reported on a health entity, such as cluster, * application or node, with additional metadata added by the Health Manager. * - * * @member {boolean} [isExpired] Returns true if the health event is expired, * otherwise false. * @member {date} [sourceUtcTimestamp] The date and time when the health report @@ -3076,7 +3018,6 @@ export interface HealthEvent extends HealthInformation { * Represents information about how many health entities are in Ok, Warning and * Error health state. * - * * @member {number} [okCount] The number of health entities with aggregated * health state Ok. * @member {number} [warningCount] The number of health entities with @@ -3127,7 +3068,6 @@ export interface EntityKindHealthStateCount { * applications and deployed service packages. * For partition, the health statistics include health counts for replicas. * - * * @member {array} [healthStateCountList] 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. @@ -3146,7 +3086,6 @@ export interface HealthStatistics { * replica are said to be a new Epoch from the ones which were sent by the old * Primary replica. * - * * @member {string} [configurationVersion] 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. @@ -3170,7 +3109,6 @@ export interface Epoch { * replica are said to be a new Epoch from the ones which were sent by the old * Primary replica. * - * * @member {string} [configurationNumber] 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. @@ -3193,7 +3131,6 @@ export interface BackupEpoch { * The health evaluation is returned when evaluating health of an entity * results in Error or Warning. * - * * @member {boolean} [considerWarningAsError] Indicates whether warnings are * treated with the same severity as errors. The field is specified in the * health policy used to evaluate the entity. @@ -3378,10 +3315,9 @@ export interface FabricConfigVersionInfo { * 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_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', @@ -3442,7 +3378,6 @@ export interface FabricErrorError { * codes. This type defines the additional information returned from the * Service Fabric API operations that are not successful. * - * * @member {object} error Error object containing error code and error message. * @member {string} [error.code] Defines the fabric error codes that be * returned as part of the error object in response to Service Fabric API @@ -3544,10 +3479,9 @@ export interface FabricErrorError { * 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_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', @@ -3956,7 +3890,6 @@ export interface PagedApplicationInfoList { * The next set of results can be obtained by executing the same query with the * continuation token provided in this list. * - * * @member {string} [continuationToken] The continuation token parameter is * used to obtain next set of results. The continuation token is included in * the response of the API when the results from the system do not fit in a @@ -4417,8 +4350,7 @@ export interface ClusterUpgradeHealthPolicyObject { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -4570,8 +4502,7 @@ export interface StartClusterUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [healthCheckWaitDurationInMilliseconds] 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 @@ -4641,8 +4572,7 @@ export interface RollingUpgradeUpdateDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -4869,7 +4799,6 @@ export interface ReplicaEvent extends FabricEvent { * Contains the replica aggregated health state, the health events and the * unhealthy evaluations. * - * * @member {uuid} [partitionId] Id of the partition to which this replica * belongs. * @member {string} serviceKind Polymorphic Discriminator @@ -4979,7 +4908,6 @@ export interface ServiceEvent extends FabricEvent { * Defines description for creating a Service Fabric service from a template * defined in the application manifest. * - * * @member {string} applicationName The name of the application, including the * 'fabric:' URI scheme. * @member {string} serviceName The full name of the service with 'fabric:' URI @@ -5096,7 +5024,6 @@ export interface ServicePlacementInvalidDomainPolicyDescription extends ServiceP * where all replicas must be able to be placed in order for any replicas to be * created. * - * */ export interface ServicePlacementNonPartiallyPlaceServicePolicyDescription extends ServicePlacementPolicyDescription { } @@ -5117,7 +5044,6 @@ export interface ServicePlacementNonPartiallyPlaceServicePolicyDescription exten * it is possible that the Primary replica may not end up located in this * domain due to failures, capacity limits, or other constraints. * - * * @member {string} [domainName] The name of the domain that should used for * placement as per this policy. */ @@ -5157,7 +5083,6 @@ export interface ServicePlacementRequiredDomainPolicyDescription extends Service * the remaining datacenters. If this is not desirable then this policy should * be set. * - * * @member {string} [domainName] The name of the domain that should used for * placement as per this policy. */ @@ -5387,7 +5312,6 @@ export interface StatefulServicePartitionInfo extends ServicePartitionInfo { * Contains the replica aggregated health state, the health events and the * unhealthy evaluations. * - * * @member {string} [replicaId] 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 @@ -5452,7 +5376,6 @@ export interface StatelessServiceInfo extends ServiceInfo { * Contains the instance aggregated health state, the health events and the * unhealthy evaluations. * - * * @member {string} [instanceId] 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 @@ -5534,7 +5457,6 @@ export interface SystemApplicationHealthEvaluation extends HealthEvaluation { * Can be returned during cluster upgrade when cluster aggregated health state * is Warning or Error. * - * * @member {string} [upgradeDomainName] Name of the upgrade domain where nodes * health is currently evaluated. * @member {number} [baselineErrorCount] Number of upgrade domain nodes with @@ -5661,7 +5583,6 @@ export interface LoadMetricReport { * default load for the service of the partition. * For default loads, LoadMetricReport's LastReportedUtc is set to 0. * - * * @member {uuid} [partitionId] Id of the partition. * @member {array} [primaryLoadMetricReports] Array of load reports from the * primary replica for this partition. @@ -5754,8 +5675,7 @@ export interface StatelessServiceInstanceInfo extends ReplicaInfo { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -5952,8 +5872,7 @@ export interface FailedUpgradeDomainProgressObject { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} * [upgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before @@ -6368,9 +6287,9 @@ export interface CodePackageEntryPoint { * importing service manifest. Possible values include: 'None', 'Process', * 'HyperV' * @member {string} [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' + * service package on a Service Fabric node. Possible values include: + * 'Invalid', 'Downloading', 'Activating', 'Active', 'Upgrading', + * 'Deactivating' * @member {string} [runFrequencyInterval] The interval at which code package * is run. This is used for periodic code package. * @member {object} [setupEntryPoint] Information about setup or main entry @@ -6501,7 +6420,6 @@ export interface DeployedCodePackageInfo { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @member {object} [map] Describes a map that contains a collection of * ChaosContextMapItem's. */ @@ -6532,7 +6450,6 @@ export interface ChaosContext { * in NodeTypeInclusionList. If both NodeTypeInclusionList and * ApplicationInclusionList are null or empty, an ArgumentException is thrown. * - * * @member {array} [nodeTypeInclusionList] A list of node types to include in * Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -6575,19 +6492,16 @@ export interface ChaosTargetFilter { * @constructor * Defines all the parameters to configure a Chaos run. * - * * @member {string} [timeToRunInSeconds] 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' . + * 4,294,967,295 (System.UInt32.MaxValue). Default value: '4294967295' . * @member {number} [maxClusterStabilizationTimeoutInSeconds] 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 . + * event. Default value: 60 . * @member {number} [maxConcurrentFaults] MaxConcurrentFaults is the maximum * number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -6595,22 +6509,19 @@ export interface ChaosTargetFilter { * The higher the concurrency, the more aggressive the injection of faults -- * 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 . + * caution while moving up. Default value: 1 . * @member {boolean} [enableMoveReplicaFaults] Enables or disables the move - * primary and move secondary faults. - * . Default value: true . + * primary and move secondary faults. Default value: true . * @member {number} [waitTimeBetweenFaultsInSeconds] 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 . + * caution while moving up. Default value: 20 . * @member {number} [waitTimeBetweenIterationsInSeconds] Time-separation (in * seconds) between two consecutive iterations of Chaos. - * The larger the value, the lower the fault injection rate. - * . Default value: 30 . + * The larger the value, the lower the fault injection rate. Default value: 30 + * . * @member {object} [clusterHealthPolicy] 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 @@ -6736,7 +6647,6 @@ export interface ChaosParameters { * @constructor * Contains a description of Chaos. * - * * @member {object} [chaosParameters] If Chaos is running, these are the * parameters Chaos is running with. * @member {string} [chaosParameters.timeToRunInSeconds] Total time (in @@ -6878,11 +6788,10 @@ export interface ChaosParameters { * At most 1000 application names can be included in this list, to increase * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. - * @member {string} [status] Current status of the Chaos run. - * . Possible values include: 'Invalid', 'Running', 'Stopped' - * @member {string} [scheduleStatus] Current status of the schedule. - * . Possible values include: 'Invalid', 'Stopped', 'Active', 'Expired', - * 'Pending' + * @member {string} [status] Current status of the Chaos run. Possible values + * include: 'Invalid', 'Running', 'Stopped' + * @member {string} [scheduleStatus] Current status of the schedule. Possible + * values include: 'Invalid', 'Stopped', 'Active', 'Expired', 'Pending' */ export interface Chaos { chaosParameters?: ChaosParameters; @@ -6896,7 +6805,6 @@ export interface Chaos { * @constructor * Defines an item in ChaosParametersDictionary of the Chaos Schedule. * - * * @member {string} key The key identifying the Chaos Parameter in the * dictionary. This key is referenced by Chaos Schedule Jobs. * @member {object} value Defines all the parameters to configure a Chaos run. @@ -7079,7 +6987,6 @@ export interface ChaosEventWrapper { * Contains the list of Chaos events and the continuation token to get the next * segment. * - * * @member {string} [continuationToken] The continuation token parameter is * used to obtain next set of results. The continuation token is included in * the response of the API when the results from the system do not fit in a @@ -7206,11 +7113,9 @@ export interface ChaosScheduleJob { * Defines the schedule used by Chaos. * * @member {date} [startDate] The date and time Chaos will start using this - * schedule. - * . Default value: new Date('1601-01-01T00:00:00Z') . + * schedule. Default value: new Date('1601-01-01T00:00:00Z') . * @member {date} [expiryDate] The date and time Chaos will continue to use - * this schedule until. - * . Default value: new Date('9999-12-31T23:59:59.999Z') . + * this schedule until. Default value: new Date('9999-12-31T23:59:59.999Z') . * @member {array} [chaosParametersDictionary] A mapping of string names to * Chaos Parameters to be referenced by Chaos Schedule Jobs. * @member {array} [jobs] A list of all Chaos Schedule Jobs that will be @@ -7438,7 +7343,6 @@ export interface StoppedChaosEvent extends ChaosEvent { * an entity, Chaos found that the entity was already faulted -- which would be * an unexpected event. * - * * @member {string} [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 @@ -7490,7 +7394,6 @@ export interface WaitingChaosEvent extends ChaosEvent { * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @member {number} [minimumNodes] 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 @@ -7638,8 +7541,7 @@ export interface RegistryCredential { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -7751,7 +7653,7 @@ export interface ComposeDeploymentUpgradeDescription { * @member {string} [applicationName] The name of the target application, * including the 'fabric:' URI scheme. * @member {string} [upgradeState] The state of the compose deployment upgrade. - * . Possible values include: 'Invalid', 'ProvisioningTarget', + * Possible values include: 'Invalid', 'ProvisioningTarget', * 'RollingForwardInProgress', 'RollingForwardPending', * 'UnprovisioningCurrent', 'RollingForwardCompleted', 'RollingBackInProgress', * 'UnprovisioningTarget', 'RollingBackCompleted', 'Failed' @@ -7781,8 +7683,7 @@ export interface ComposeDeploymentUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -7957,7 +7858,6 @@ export interface PagedComposeDeploymentStatusInfoList { * @constructor * Defines description for creating a Service Fabric compose deployment. * - * * @member {string} deploymentName The name of the deployment. * @member {string} composeFileContent The content of the compose file that * describes the deployment to create. @@ -7987,9 +7887,9 @@ export interface CreateComposeDeploymentDescription { * @member {string} [version] The version of the service package specified in * service manifest. * @member {string} [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' + * service package on a Service Fabric node. Possible values include: + * 'Invalid', 'Downloading', 'Activating', 'Active', 'Upgrading', + * 'Deactivating' * @member {string} [servicePackageActivationId] The ActivationId of a deployed * service package. If ServicePackageActivationMode specified at the time of * creating the service @@ -8249,7 +8149,6 @@ export interface StatelessServiceDescription extends ServiceDescription { * Depending on the role of the replicator, the properties in this type imply * different meanings. * - * * @member {number} [queueUtilizationPercentage] 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. @@ -8291,7 +8190,6 @@ export interface ReplicatorQueueStatus { * replication/copy queue utilization, last acknowledgement received timestamp, * etc. * - * * @member {string} kind Polymorphic Discriminator */ export interface ReplicatorStatus { @@ -8372,7 +8270,6 @@ export interface RemoteReplicatorAcknowledgementStatus { * Represents the state of the secondary replicator from the primary * replicator’s point of view. * - * * @member {string} [replicaId] Represents the replica ID of the remote * secondary replicator. * @member {date} [lastAcknowledgementProcessedTimeUtc] The last timestamp (in @@ -9008,7 +8905,6 @@ export interface ImageStoreCopyDescription { * Defines description for restarting a deployed code package on Service Fabric * node. * - * * @member {string} serviceManifestName The name of service manifest that * specified this code package. * @member {string} [servicePackageActivationId] The ActivationId of a deployed @@ -9227,7 +9123,6 @@ export interface NodeTransitionResult { * valid until OperationState * is Completed or Faulted. * - * * @member {string} [state] The state of the operation. Possible values * include: 'Invalid', 'Running', 'RollingBack', 'Completed', 'Faulted', * 'Cancelled', 'ForceCancelled' @@ -9410,7 +9305,6 @@ export interface PackageSharingPolicyInfo { * Defines description for downloading packages associated with a service * manifest to image cache on a Service Fabric node. * - * * @member {string} serviceManifestName The name of service manifest whose * packages need to be downloaded. * @member {string} applicationTypeName The application type name as defined in @@ -9537,8 +9431,7 @@ export interface ResumeApplicationUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing @@ -9832,7 +9725,6 @@ export interface PropertyBatchDescriptionList { * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @member {boolean} exists Whether or not the property should exist for the * operation to pass. */ @@ -9854,7 +9746,6 @@ export interface CheckExistsPropertyBatchOperation extends PropertyBatchOperatio * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @member {string} sequenceNumber The expected sequence number. */ export interface CheckSequencePropertyBatchOperation extends PropertyBatchOperation { @@ -9872,7 +9763,6 @@ export interface CheckSequencePropertyBatchOperation extends PropertyBatchOperat * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @member {object} value The expected property value. * @member {string} [value.kind] Polymorphic Discriminator */ @@ -9889,7 +9779,6 @@ export interface CheckValuePropertyBatchOperation extends PropertyBatchOperation * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * */ export interface DeletePropertyBatchOperation extends PropertyBatchOperation { } @@ -9903,12 +9792,10 @@ export interface DeletePropertyBatchOperation extends PropertyBatchOperation { * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @member {boolean} [includeValue] 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 . + * property metadata. Default value: false . */ export interface GetPropertyBatchOperation extends PropertyBatchOperation { includeValue?: boolean; @@ -9922,7 +9809,6 @@ export interface GetPropertyBatchOperation extends PropertyBatchOperation { * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @member {object} value Describes a Service Fabric property value. * @member {string} [value.kind] Polymorphic Discriminator * @member {string} [customTypeId] The property's custom type id. Using this @@ -10070,14 +9956,14 @@ export interface PagedBackupPolicyDescriptionList { * @member {string} [policyName] The name of the backup policy which is * applicable to this Service Fabric application or service or partition. * @member {string} [policyInheritedFrom] Specifies the scope at which the - * backup policy is applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + * backup policy is applied. Possible values include: 'Invalid', 'Partition', + * 'Service', 'Application' * @member {object} [suspensionInfo] Describes the backup suspension details. * @member {boolean} [suspensionInfo.isSuspended] Indicates whether periodic * backup is suspended at this level or not. * @member {string} [suspensionInfo.suspensionInheritedFrom] Specifies the - * scope at which the backup suspension was applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + * scope at which the backup suspension was applied. Possible values include: + * 'Invalid', 'Partition', 'Service', 'Application' * @member {string} kind Polymorphic Discriminator */ export interface BackupConfigurationInfo { @@ -10123,12 +10009,11 @@ export interface ServiceBackupConfigurationInfo extends BackupConfigurationInfo * @constructor * Describes the backup suspension details. * - * * @member {boolean} [isSuspended] Indicates whether periodic backup is * suspended at this level or not. * @member {string} [suspensionInheritedFrom] Specifies the scope at which the - * backup suspension was applied. - * . Possible values include: 'Invalid', 'Partition', 'Service', 'Application' + * backup suspension was applied. Possible values include: 'Invalid', + * 'Partition', 'Service', 'Application' */ export interface BackupSuspensionInfo { isSuspended?: boolean; @@ -10186,9 +10071,8 @@ export interface RestorePartitionDescription { * Describes the progress of a restore operation on a partition. * * @member {string} [restoreState] Represents the current state of the - * partition restore operation. - * . Possible values include: 'Invalid', 'Accepted', 'RestoreInProgress', - * 'Success', 'Failure', 'Timeout' + * partition restore operation. Possible values include: 'Invalid', 'Accepted', + * 'RestoreInProgress', 'Success', 'Failure', 'Timeout' * @member {date} [timeStampUtc] Timestamp when operation succeeded or failed. * @member {object} [restoredEpoch] Describes the epoch at which the partition * is restored. @@ -10303,10 +10187,9 @@ export interface RestorePartitionDescription { * 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_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', @@ -10404,8 +10287,7 @@ export interface BackupPartitionDescription { * @member {string} [backupLocation] Location of the backup, relative to the * backup store. * @member {string} [backupType] Describes the type of backup, whether its full - * or incremental. - * . Possible values include: 'Invalid', 'Full', 'Incremental' + * or incremental. Possible values include: 'Invalid', 'Full', 'Incremental' * @member {object} [epochOfLastBackupRecord] Epoch of the last record in this * backup. * @member {string} [epochOfLastBackupRecord.configurationNumber] The current @@ -10522,10 +10404,9 @@ export interface BackupPartitionDescription { * 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_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', @@ -10672,8 +10553,8 @@ export interface FrequencyBasedBackupScheduleDescription extends BackupScheduleD * Describes the time based backup schedule. * * @member {string} scheduleFrequencyType Describes the frequency with which to - * run the time based backup schedule. - * . Possible values include: 'Invalid', 'Daily', 'Weekly' + * run the time based backup schedule. Possible values include: 'Invalid', + * 'Daily', 'Weekly' * @member {array} [runDays] List of days of a week when to trigger the * periodic backup. This is valid only when the backup schedule frequency type * is weekly. @@ -10694,9 +10575,8 @@ export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescri * Describes the progress of a partition's backup. * * @member {string} [backupState] Represents the current state of the partition - * backup operation. - * . Possible values include: 'Invalid', 'Accepted', 'BackupInProgress', - * 'Success', 'Failure', 'Timeout' + * backup operation. Possible values include: 'Invalid', 'Accepted', + * 'BackupInProgress', 'Success', 'Failure', 'Timeout' * @member {date} [timeStampUtc] TimeStamp in UTC when operation succeeded or * failed. * @member {uuid} [backupId] Unique ID of the newly created backup. @@ -10817,10 +10697,9 @@ export interface TimeBasedBackupScheduleDescription extends BackupScheduleDescri * 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_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', @@ -11036,7 +10915,6 @@ export interface GetBackupByStorageQueryDescription { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} nodeName The name of the impacted node. * @member {string} [impactLevel] The level of impact expected. Possible values * include: 'Invalid', 'None', 'Restart', 'RemoveData', 'RemoveNode' @@ -11055,7 +10933,6 @@ export interface NodeImpact { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} kind Polymorphic Discriminator */ export interface RepairImpactDescriptionBase { @@ -11071,7 +10948,6 @@ export interface RepairImpactDescriptionBase { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {array} [nodeImpactList] The list of nodes impacted by a repair * action and their respective expected impact. */ @@ -11088,7 +10964,6 @@ export interface NodeRepairImpactDescription extends RepairImpactDescriptionBase * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} kind Polymorphic Discriminator */ export interface RepairTargetDescriptionBase { @@ -11104,7 +10979,6 @@ export interface RepairTargetDescriptionBase { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {array} [nodeNames] The list of nodes targeted by a repair action. */ export interface NodeRepairTargetDescription extends RepairTargetDescriptionBase { @@ -11120,7 +10994,6 @@ export interface NodeRepairTargetDescription extends RepairTargetDescriptionBase * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {date} [createdUtcTimestamp] The time when the repair task entered * the Created state. * @member {date} [claimedUtcTimestamp] The time when the repair task entered @@ -11168,7 +11041,6 @@ export interface RepairTaskHistory { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} taskId The ID of the repair task. * @member {string} [version] The version of the repair task. * When creating a new repair task, the version must be set to zero. When @@ -11287,7 +11159,6 @@ export interface RepairTask { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} taskId The ID of the repair task. * @member {string} [version] The current version number of the repair task. If * non-zero, then the request will only succeed if this value matches the @@ -11308,7 +11179,6 @@ export interface RepairTaskApproveDescription { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} taskId The ID of the repair task. * @member {string} [version] The current version number of the repair task. If * non-zero, then the request will only succeed if this value matches the @@ -11333,7 +11203,6 @@ export interface RepairTaskCancelDescription { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} taskId The ID of the completed repair task to be deleted. * @member {string} [version] The current version number of the repair task. If * non-zero, then the request will only succeed if this value matches the @@ -11354,7 +11223,6 @@ export interface RepairTaskDeleteDescription { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} taskId The ID of the repair task to be updated. * @member {string} [version] The current version number of the repair task. If * non-zero, then the request will only succeed if this value matches the @@ -11385,7 +11253,6 @@ export interface RepairTaskUpdateHealthPolicyDescription { * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @member {string} version The new version of the repair task. */ export interface RepairTaskUpdateInfo { diff --git a/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js b/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js index 52557313e2..259424999d 100644 --- a/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/monitoringPolicyDescription.js @@ -23,8 +23,7 @@ class MonitoringPolicyDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [healthCheckWaitDurationInMilliseconds] 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 diff --git a/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js b/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js index bc445f173c..22815f8be7 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthStateChunk.js @@ -16,7 +16,6 @@ const models = require('./index'); * Represents the health state chunk of a node, which contains the node name * and its aggregated health state. * - * * @extends models['EntityHealthStateChunk'] */ class NodeHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/nodeHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/nodeHealthStateChunkList.js index b5c78478c6..8595851ef6 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthStateChunkList.js @@ -17,7 +17,6 @@ const models = require('./index'); * filters in the chunk query. Returned by get cluster health state chunks * query. * - * * @extends models['EntityHealthStateChunkList'] */ class NodeHealthStateChunkList extends models['EntityHealthStateChunkList'] { diff --git a/lib/services/serviceFabric/lib/models/nodeHealthStateFilter.js b/lib/services/serviceFabric/lib/models/nodeHealthStateFilter.js index 7cc6cb8c62..db6e932051 100644 --- a/lib/services/serviceFabric/lib/models/nodeHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/nodeHealthStateFilter.js @@ -17,7 +17,6 @@ * properties. * Can be specified in the cluster health chunk query description. * - * */ class NodeHealthStateFilter { /** @@ -55,8 +54,7 @@ class NodeHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/nodeImpact.js b/lib/services/serviceFabric/lib/models/nodeImpact.js index eea867b7df..538b7b6c66 100644 --- a/lib/services/serviceFabric/lib/models/nodeImpact.js +++ b/lib/services/serviceFabric/lib/models/nodeImpact.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class NodeImpact { /** diff --git a/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js b/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js index 5edc43f725..674f471263 100644 --- a/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js +++ b/lib/services/serviceFabric/lib/models/nodeRepairImpactDescription.js @@ -18,7 +18,6 @@ const models = require('./index'); * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @extends models['RepairImpactDescriptionBase'] */ class NodeRepairImpactDescription extends models['RepairImpactDescriptionBase'] { diff --git a/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js b/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js index e604312fb3..654e1ec5cc 100644 --- a/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js +++ b/lib/services/serviceFabric/lib/models/nodeRepairTargetDescription.js @@ -18,7 +18,6 @@ const models = require('./index'); * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @extends models['RepairTargetDescriptionBase'] */ class NodeRepairTargetDescription extends models['RepairTargetDescriptionBase'] { diff --git a/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js b/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js index 8431f4a88f..4dac83696e 100644 --- a/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js +++ b/lib/services/serviceFabric/lib/models/nodeTransitionProgress.js @@ -18,7 +18,6 @@ const models = require('./index'); * valid until OperationState * is Completed or Faulted. * - * */ class NodeTransitionProgress { /** diff --git a/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js b/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js index 7cfc47b20b..e4cbbb6c3d 100644 --- a/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js +++ b/lib/services/serviceFabric/lib/models/pagedDeployedApplicationInfoList.js @@ -19,7 +19,6 @@ const models = require('./index'); * The next set of results can be obtained by executing the same query with the * continuation token provided in this list. * - * */ class PagedDeployedApplicationInfoList { /** diff --git a/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js b/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js index b931351978..b167bcb2be 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthStateChunk.js @@ -17,7 +17,6 @@ const models = require('./index'); * partition ID, its aggregated health state and any replicas that respect the * filters in the cluster health chunk query description. * - * * @extends models['EntityHealthStateChunk'] */ class PartitionHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/partitionHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/partitionHealthStateChunkList.js index a5acd8314f..287859b7ad 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthStateChunkList.js @@ -18,7 +18,6 @@ const models = require('./index'); * Returned by get cluster health state chunks query as part of the parent * application hierarchy. * - * */ class PartitionHealthStateChunkList { /** diff --git a/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js b/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js index f085baf306..051c000452 100644 --- a/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/partitionHealthStateFilter.js @@ -21,7 +21,6 @@ const models = require('./index'); * One filter can match zero, one or multiple partitions, depending on its * properties. * - * */ class PartitionHealthStateFilter { /** @@ -60,8 +59,7 @@ class PartitionHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [replicaFilters] 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 diff --git a/lib/services/serviceFabric/lib/models/partitionLoadInformation.js b/lib/services/serviceFabric/lib/models/partitionLoadInformation.js index 9a00a8fdbb..b33251b7f1 100644 --- a/lib/services/serviceFabric/lib/models/partitionLoadInformation.js +++ b/lib/services/serviceFabric/lib/models/partitionLoadInformation.js @@ -19,7 +19,6 @@ const models = require('./index'); * default load for the service of the partition. * For default loads, LoadMetricReport's LastReportedUtc is set to 0. * - * */ class PartitionLoadInformation { /** diff --git a/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js b/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js index 3fe958d3e4..0474b36308 100644 --- a/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js +++ b/lib/services/serviceFabric/lib/models/putPropertyBatchOperation.js @@ -17,7 +17,6 @@ const models = require('./index'); * Note that if one PropertyBatchOperation in a PropertyBatch fails, * the entire batch fails and cannot be committed in a transactional manner. * - * * @extends models['PropertyBatchOperation'] */ class PutPropertyBatchOperation extends models['PropertyBatchOperation'] { diff --git a/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js b/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js index a3fb6f9669..b24cfc6faf 100644 --- a/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/remoteReplicatorStatus.js @@ -16,7 +16,6 @@ const models = require('./index'); * Represents the state of the secondary replicator from the primary * replicator’s point of view. * - * */ class RemoteReplicatorStatus { /** diff --git a/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js b/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js index 6911bf13ec..8a61e6592a 100644 --- a/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js +++ b/lib/services/serviceFabric/lib/models/repairImpactDescriptionBase.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairImpactDescriptionBase { /** diff --git a/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js b/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js index c5d5ccfbd5..da73a43f75 100644 --- a/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js +++ b/lib/services/serviceFabric/lib/models/repairTargetDescriptionBase.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTargetDescriptionBase { /** diff --git a/lib/services/serviceFabric/lib/models/repairTask.js b/lib/services/serviceFabric/lib/models/repairTask.js index 4745b29e80..3d35bbade7 100644 --- a/lib/services/serviceFabric/lib/models/repairTask.js +++ b/lib/services/serviceFabric/lib/models/repairTask.js @@ -19,7 +19,6 @@ const models = require('./index'); * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTask { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js b/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js index e77e64eecf..7ae39ef59e 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskApproveDescription.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskApproveDescription { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js b/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js index a716641ff4..e4b4d9f368 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskCancelDescription.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskCancelDescription { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskDeleteDescription.js b/lib/services/serviceFabric/lib/models/repairTaskDeleteDescription.js index 6f58323d14..b866081185 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskDeleteDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskDeleteDescription.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskDeleteDescription { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskHistory.js b/lib/services/serviceFabric/lib/models/repairTaskHistory.js index 10f65b3b93..ab6c94deab 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskHistory.js +++ b/lib/services/serviceFabric/lib/models/repairTaskHistory.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskHistory { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskUpdateHealthPolicyDescription.js b/lib/services/serviceFabric/lib/models/repairTaskUpdateHealthPolicyDescription.js index 32fdf64e03..3207f74682 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskUpdateHealthPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/repairTaskUpdateHealthPolicyDescription.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskUpdateHealthPolicyDescription { /** diff --git a/lib/services/serviceFabric/lib/models/repairTaskUpdateInfo.js b/lib/services/serviceFabric/lib/models/repairTaskUpdateInfo.js index 021657e52b..5e9ef9003f 100644 --- a/lib/services/serviceFabric/lib/models/repairTaskUpdateInfo.js +++ b/lib/services/serviceFabric/lib/models/repairTaskUpdateInfo.js @@ -16,7 +16,6 @@ * This type supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * */ class RepairTaskUpdateInfo { /** diff --git a/lib/services/serviceFabric/lib/models/replicaHealth.js b/lib/services/serviceFabric/lib/models/replicaHealth.js index d37014f36f..cbc370fed4 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealth.js +++ b/lib/services/serviceFabric/lib/models/replicaHealth.js @@ -18,7 +18,6 @@ const models = require('./index'); * Contains the replica aggregated health state, the health events and the * unhealthy evaluations. * - * * @extends models['EntityHealth'] */ class ReplicaHealth extends models['EntityHealth'] { diff --git a/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js b/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js index 0f2f1413bf..ccf310ebde 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthStateChunk.js @@ -18,7 +18,6 @@ const models = require('./index'); * The replica health state contains the replica ID and its aggregated health * state. * - * * @extends models['EntityHealthStateChunk'] */ class ReplicaHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/replicaHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/replicaHealthStateChunkList.js index d4709db8ee..b289809b90 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthStateChunkList.js @@ -16,7 +16,6 @@ const models = require('./index'); * The list of replica health state chunks that respect the input filters in * the chunk query. Returned by get cluster health state chunks query. * - * */ class ReplicaHealthStateChunkList { /** diff --git a/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js b/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js index a84bb6a0ff..bf4390ae90 100644 --- a/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/replicaHealthStateFilter.js @@ -20,7 +20,6 @@ * One filter can match zero, one or multiple replicas, depending on its * properties. * - * */ class ReplicaHealthStateFilter { /** @@ -59,8 +58,7 @@ class ReplicaHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/replicatorQueueStatus.js b/lib/services/serviceFabric/lib/models/replicatorQueueStatus.js index 978ca5769f..2ffc88b6ed 100644 --- a/lib/services/serviceFabric/lib/models/replicatorQueueStatus.js +++ b/lib/services/serviceFabric/lib/models/replicatorQueueStatus.js @@ -19,7 +19,6 @@ * Depending on the role of the replicator, the properties in this type imply * different meanings. * - * */ class ReplicatorQueueStatus { /** diff --git a/lib/services/serviceFabric/lib/models/replicatorStatus.js b/lib/services/serviceFabric/lib/models/replicatorStatus.js index 2d831e1036..db865f2722 100644 --- a/lib/services/serviceFabric/lib/models/replicatorStatus.js +++ b/lib/services/serviceFabric/lib/models/replicatorStatus.js @@ -16,7 +16,6 @@ * replication/copy queue utilization, last acknowledgement received timestamp, * etc. * - * */ class ReplicatorStatus { /** diff --git a/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js b/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js index 5f8662dbf1..2411e3d6a7 100644 --- a/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js +++ b/lib/services/serviceFabric/lib/models/restartDeployedCodePackageDescription.js @@ -14,7 +14,6 @@ * Defines description for restarting a deployed code package on Service Fabric * node. * - * */ class RestartDeployedCodePackageDescription { /** diff --git a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js index 4b8e4ca9bb..cd9d5a42f6 100644 --- a/lib/services/serviceFabric/lib/models/restoreProgressInfo.js +++ b/lib/services/serviceFabric/lib/models/restoreProgressInfo.js @@ -20,9 +20,8 @@ class RestoreProgressInfo { /** * Create a RestoreProgressInfo. * @member {string} [restoreState] Represents the current state of the - * partition restore operation. - * . Possible values include: 'Invalid', 'Accepted', 'RestoreInProgress', - * 'Success', 'Failure', 'Timeout' + * partition restore operation. Possible values include: 'Invalid', + * 'Accepted', 'RestoreInProgress', 'Success', 'Failure', 'Timeout' * @member {date} [timeStampUtc] Timestamp when operation succeeded or * failed. * @member {object} [restoredEpoch] Describes the epoch at which the @@ -138,8 +137,8 @@ class RestoreProgressInfo { * Timeout) * - "FABRIC_E_COMMUNICATION_ERROR" * - "FABRIC_E_OPERATION_NOT_COMPLETE" - * - "FABRIC_E_TIMEOUT" - * . Possible values include: 'FABRIC_E_INVALID_PARTITION_KEY', + * - "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', diff --git a/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js b/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js index 0a70719bc3..21b7692ac9 100644 --- a/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js +++ b/lib/services/serviceFabric/lib/models/rollingUpgradeUpdateDescription.js @@ -38,8 +38,7 @@ class RollingUpgradeUpdateDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [healthCheckWaitDurationInMilliseconds] 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 diff --git a/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js b/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js index eddc2ea2f1..a77a801a11 100644 --- a/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js +++ b/lib/services/serviceFabric/lib/models/serviceFromTemplateDescription.js @@ -14,7 +14,6 @@ * Defines description for creating a Service Fabric service from a template * defined in the application manifest. * - * */ class ServiceFromTemplateDescription { /** diff --git a/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js b/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js index 8004eb4cb2..7040b8ecb5 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthStateChunk.js @@ -17,7 +17,6 @@ const models = require('./index'); * name, its aggregated health state and any partitions that respect the * filters in the cluster health chunk query description. * - * * @extends models['EntityHealthStateChunk'] */ class ServiceHealthStateChunk extends models['EntityHealthStateChunk'] { diff --git a/lib/services/serviceFabric/lib/models/serviceHealthStateChunkList.js b/lib/services/serviceFabric/lib/models/serviceHealthStateChunkList.js index 37c057ffc4..be90a5a8f8 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthStateChunkList.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthStateChunkList.js @@ -16,7 +16,6 @@ const models = require('./index'); * The list of service health state chunks that respect the input filters in * the chunk query. Returned by get cluster health state chunks query. * - * */ class ServiceHealthStateChunkList { /** diff --git a/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js b/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js index fdda27e281..e1be8605b3 100644 --- a/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js +++ b/lib/services/serviceFabric/lib/models/serviceHealthStateFilter.js @@ -20,7 +20,6 @@ const models = require('./index'); * One filter can match zero, one or multiple services, depending on its * properties. * - * */ class ServiceHealthStateFilter { /** @@ -59,8 +58,7 @@ class ServiceHealthStateFilter { * - Error - Filter 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 . + * 65535. Default value: 0 . * @member {array} [partitionFilters] 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 diff --git a/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js index 29cb121710..912f92e9a8 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementNonPartiallyPlaceServicePolicyDescription.js @@ -17,7 +17,6 @@ const models = require('./index'); * where all replicas must be able to be placed in order for any replicas to be * created. * - * * @extends models['ServicePlacementPolicyDescription'] */ class ServicePlacementNonPartiallyPlaceServicePolicyDescription extends models['ServicePlacementPolicyDescription'] { diff --git a/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js index 4c46a02441..eb6d983d48 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementPreferPrimaryDomainPolicyDescription.js @@ -25,7 +25,6 @@ const models = require('./index'); * it is possible that the Primary replica may not end up located in this * domain due to failures, capacity limits, or other constraints. * - * * @extends models['ServicePlacementPolicyDescription'] */ class ServicePlacementPreferPrimaryDomainPolicyDescription extends models['ServicePlacementPolicyDescription'] { diff --git a/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js b/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js index fd364e8ecc..6ebb133e44 100644 --- a/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js +++ b/lib/services/serviceFabric/lib/models/servicePlacementRequireDomainDistributionPolicyDescription.js @@ -26,7 +26,6 @@ const models = require('./index'); * the remaining datacenters. If this is not desirable then this policy should * be set. * - * * @extends models['ServicePlacementPolicyDescription'] */ class ServicePlacementRequireDomainDistributionPolicyDescription extends models['ServicePlacementPolicyDescription'] { diff --git a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js index d648a4398a..081566f2f2 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicy.js @@ -14,7 +14,6 @@ * Represents the health policy used to evaluate the health of services * belonging to a service type. * - * */ class ServiceTypeHealthPolicy { /** @@ -30,8 +29,7 @@ class ServiceTypeHealthPolicy { * 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 . + * partitions. Default percentage is zero. Default value: 0 . * @member {number} [maxPercentUnhealthyReplicasPerPartition] The maximum * allowed percentage of unhealthy replicas per partition. Allowed values are * Byte values from zero to 100. @@ -43,8 +41,7 @@ class ServiceTypeHealthPolicy { * 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 . + * replicas. Default percentage is zero. Default value: 0 . * @member {number} [maxPercentUnhealthyServices] The maximum maximum allowed * percentage of unhealthy services. Allowed values are Byte values from zero * to 100. @@ -57,8 +54,7 @@ class ServiceTypeHealthPolicy { * 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 . + * services. Default percentage is zero. Default value: 0 . */ constructor() { } diff --git a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js index c4093f7ea5..01cc990d72 100644 --- a/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js +++ b/lib/services/serviceFabric/lib/models/serviceTypeHealthPolicyMapItem.js @@ -15,7 +15,6 @@ const models = require('./index'); /** * Defines an item in ServiceTypeHealthPolicyMap. * - * */ class ServiceTypeHealthPolicyMapItem { /** diff --git a/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js b/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js index f77846a6d3..a4a7ae574c 100644 --- a/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/startClusterUpgradeDescription.js @@ -47,8 +47,7 @@ class StartClusterUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [monitoringPolicy.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js index d76750141b..c3bcb44329 100644 --- a/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js +++ b/lib/services/serviceFabric/lib/models/statefulServiceReplicaHealth.js @@ -17,7 +17,6 @@ const models = require('./index'); * Contains the replica aggregated health state, the health events and the * unhealthy evaluations. * - * * @extends models['ReplicaHealth'] */ class StatefulServiceReplicaHealth extends models['ReplicaHealth'] { diff --git a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js index 7d390cab42..d3db4de300 100644 --- a/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js +++ b/lib/services/serviceFabric/lib/models/statelessServiceInstanceHealth.js @@ -17,7 +17,6 @@ const models = require('./index'); * Contains the instance aggregated health state, the health events and the * unhealthy evaluations. * - * * @extends models['ReplicaHealth'] */ class StatelessServiceInstanceHealth extends models['ReplicaHealth'] { diff --git a/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js b/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js index 6b478d0b79..9942bd7828 100644 --- a/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js +++ b/lib/services/serviceFabric/lib/models/testErrorChaosEvent.js @@ -19,7 +19,6 @@ const models = require('./index'); * an entity, Chaos found that the entity was already faulted -- which would be * an unexpected event. * - * * @extends models['ChaosEvent'] */ class TestErrorChaosEvent extends models['ChaosEvent'] { diff --git a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js index 11ef33811a..8e514daddb 100644 --- a/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js +++ b/lib/services/serviceFabric/lib/models/timeBasedBackupScheduleDescription.js @@ -21,8 +21,8 @@ class TimeBasedBackupScheduleDescription extends models['BackupScheduleDescripti /** * Create a TimeBasedBackupScheduleDescription. * @member {string} scheduleFrequencyType Describes the frequency with which - * to run the time based backup schedule. - * . Possible values include: 'Invalid', 'Daily', 'Weekly' + * to run the time based backup schedule. Possible values include: 'Invalid', + * 'Daily', 'Weekly' * @member {array} [runDays] List of days of a week when to trigger the * periodic backup. This is valid only when the backup schedule frequency * type is weekly. diff --git a/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js b/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js index b7a7b72c4e..dc5d5be5be 100644 --- a/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js +++ b/lib/services/serviceFabric/lib/models/updateClusterUpgradeDescription.js @@ -44,8 +44,7 @@ class UpdateClusterUpgradeDescription { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * @member {string} [updateDescription.healthCheckWaitDurationInMilliseconds] * The amount of time to wait after completing an upgrade domain before * applying health policies. It is first interpreted as a string representing diff --git a/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js b/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js index a21220d796..1048f3ced2 100644 --- a/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js +++ b/lib/services/serviceFabric/lib/models/upgradeDomainDeltaNodesCheckHealthEvaluation.js @@ -19,7 +19,6 @@ const models = require('./index'); * Can be returned during cluster upgrade when cluster aggregated health state * is Warning or Error. * - * * @extends models['HealthEvaluation'] */ class UpgradeDomainDeltaNodesCheckHealthEvaluation extends models['HealthEvaluation'] { diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts index 2e629e7492..1d05fa7c41 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.d.ts +++ b/lib/services/serviceFabric/lib/serviceFabricClient.d.ts @@ -49,7 +49,6 @@ export default class ServiceFabricClient extends ServiceClient { * users are not expected to take a dependency on the format of the file * contents or its interpretation. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -85,7 +84,6 @@ export default class ServiceFabricClient extends ServiceClient { * users are not expected to take a dependency on the format of the file * contents or its interpretation. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -133,7 +131,6 @@ export default class ServiceFabricClient extends ServiceClient { * filter the collection of nodes and applications returned based on their * aggregated health state. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -159,7 +156,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -186,7 +182,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -210,14 +205,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -229,7 +222,6 @@ export default class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -256,7 +248,6 @@ export default class ServiceFabricClient extends ServiceClient { * filter the collection of nodes and applications returned based on their * aggregated health state. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -282,7 +273,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -309,7 +299,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -333,14 +322,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -352,7 +339,6 @@ export default class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -401,7 +387,6 @@ export default class ServiceFabricClient extends ServiceClient { * Use ClusterHealthPolicies to override the health policies used to evaluate * the health. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -427,7 +412,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -454,7 +438,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -478,14 +461,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -497,7 +478,6 @@ export default class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {object} [options.clusterHealthPolicies] Describes the health * policies used to evaluate the cluster health. * If not present, the health evaluation uses the cluster health policy defined @@ -509,7 +489,6 @@ export default class ServiceFabricClient extends ServiceClient { * an application, the specified application health policy * is used to evaluate the application health. * - * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * Defines a map that contains specific application health policies for * different applications. @@ -521,12 +500,10 @@ export default class ServiceFabricClient extends ServiceClient { * defined in the manifest). * The map is empty by default. * - * * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -548,7 +525,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -566,7 +542,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -592,7 +567,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -622,7 +596,6 @@ export default class ServiceFabricClient extends ServiceClient { * Use ClusterHealthPolicies to override the health policies used to evaluate * the health. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -648,7 +621,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -675,7 +647,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -699,14 +670,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -718,7 +687,6 @@ export default class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {object} [options.clusterHealthPolicies] Describes the health * policies used to evaluate the cluster health. * If not present, the health evaluation uses the cluster health policy defined @@ -730,7 +698,6 @@ export default class ServiceFabricClient extends ServiceClient { * an application, the specified application health policy * is used to evaluate the application health. * - * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * Defines a map that contains specific application health policies for * different applications. @@ -742,12 +709,10 @@ export default class ServiceFabricClient extends ServiceClient { * defined in the manifest). * The map is empty by default. * - * * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -769,7 +734,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -787,7 +751,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -813,7 +776,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -859,7 +821,6 @@ export default class ServiceFabricClient extends ServiceClient { * entities, use the POST URI and specify the cluster health chunk query * description. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -888,7 +849,6 @@ export default class ServiceFabricClient extends ServiceClient { * entities, use the POST URI and specify the cluster health chunk query * description. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -943,7 +903,6 @@ export default class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.clusterHealthChunkQueryDescription] Describes the @@ -968,7 +927,6 @@ export default class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] * Defines a list of filters that specify which nodes to be included in the * returned cluster health chunk. @@ -980,7 +938,6 @@ export default class ServiceFabricClient extends ServiceClient { * Error and another filter to always include a node identified by its * NodeName. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a * list of filters that specify which applications to be included in the @@ -993,13 +950,11 @@ export default class ServiceFabricClient extends ServiceClient { * state Error and another filter to always include applications of a specified * application type. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a * health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -1021,7 +976,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -1039,7 +993,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -1065,13 +1018,11 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -1110,7 +1061,6 @@ export default class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.clusterHealthChunkQueryDescription] Describes the @@ -1135,7 +1085,6 @@ export default class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] * Defines a list of filters that specify which nodes to be included in the * returned cluster health chunk. @@ -1147,7 +1096,6 @@ export default class ServiceFabricClient extends ServiceClient { * Error and another filter to always include a node identified by its * NodeName. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a * list of filters that specify which applications to be included in the @@ -1160,13 +1108,11 @@ export default class ServiceFabricClient extends ServiceClient { * state Error and another filter to always include applications of a specified * application type. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a * health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -1188,7 +1134,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -1206,7 +1151,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -1232,13 +1176,11 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -1295,7 +1237,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetClusterHealth and check that the report appears in the HealthEvents * section. * - * * @param {object} healthInformation 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. @@ -1303,7 +1244,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -1319,7 +1259,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -1338,7 +1277,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -1350,7 +1288,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -1358,7 +1295,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -1371,7 +1307,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -1393,7 +1328,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -1426,7 +1360,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetClusterHealth and check that the report appears in the HealthEvents * section. * - * * @param {object} healthInformation 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. @@ -1434,7 +1367,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -1450,7 +1382,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -1469,7 +1400,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -1481,7 +1411,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -1489,7 +1418,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -1502,7 +1430,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -1524,7 +1451,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -1785,7 +1711,6 @@ export default class ServiceFabricClient extends ServiceClient { * types on the cluster, * security configurations, fault and upgrade domain topologies, etc. * - * * @param {string} configurationApiVersion The API version of the Standalone * cluster json configuration. * @@ -1815,7 +1740,6 @@ export default class ServiceFabricClient extends ServiceClient { * types on the cluster, * security configurations, fault and upgrade domain topologies, etc. * - * * @param {string} configurationApiVersion The API version of the Standalone * cluster json configuration. * @@ -1863,7 +1787,6 @@ export default class ServiceFabricClient extends ServiceClient { * Get the cluster configuration upgrade status details of a Service Fabric * standalone cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -1889,7 +1812,6 @@ export default class ServiceFabricClient extends ServiceClient { * Get the cluster configuration upgrade status details of a Service Fabric * standalone cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -2443,8 +2365,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -2487,7 +2408,6 @@ export default class ServiceFabricClient extends ServiceClient { * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -2509,7 +2429,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -2527,7 +2446,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -2553,7 +2471,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -2586,7 +2503,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -2659,8 +2575,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -2703,7 +2618,6 @@ export default class ServiceFabricClient extends ServiceClient { * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -2725,7 +2639,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -2743,7 +2656,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -2769,7 +2681,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -2802,7 +2713,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -3051,8 +2961,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -3095,7 +3004,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -3117,7 +3025,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -3135,7 +3042,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -3161,7 +3067,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -3194,7 +3099,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -3261,8 +3165,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -3305,7 +3208,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -3327,7 +3229,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -3345,7 +3246,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -3371,7 +3271,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -3404,7 +3303,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -3456,7 +3354,6 @@ export default class ServiceFabricClient extends ServiceClient { * needed to set up an Azure Active Directory secured connection with a Service * Fabric cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -3485,7 +3382,6 @@ export default class ServiceFabricClient extends ServiceClient { * needed to set up an Azure Active Directory secured connection with a Service * Fabric cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -3728,7 +3624,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -3780,7 +3675,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -3853,7 +3747,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.clusterHealthPolicy] 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 @@ -3878,7 +3771,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum * allowed percentage of unhealthy applications before reporting an error. For @@ -3896,7 +3788,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific * application types. @@ -3921,7 +3812,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -3975,7 +3865,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.clusterHealthPolicy] 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 @@ -4000,7 +3889,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum * allowed percentage of unhealthy applications before reporting an error. For @@ -4018,7 +3906,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific * application types. @@ -4043,7 +3930,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -4094,7 +3980,6 @@ export default class ServiceFabricClient extends ServiceClient { * To see whether the report was applied in the health store, run GetNodeHealth * and check that the report appears in the HealthEvents section. * - * * @param {string} nodeName The name of the node. * * @param {object} healthInformation Describes the health information for the @@ -4104,7 +3989,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -4120,7 +4004,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -4139,7 +4022,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -4151,7 +4033,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -4159,7 +4040,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -4172,7 +4052,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -4194,7 +4073,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -4226,7 +4104,6 @@ export default class ServiceFabricClient extends ServiceClient { * To see whether the report was applied in the health store, run GetNodeHealth * and check that the report appears in the HealthEvents section. * - * * @param {string} nodeName The name of the node. * * @param {object} healthInformation Describes the health information for the @@ -4236,7 +4113,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -4252,7 +4128,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -4271,7 +4146,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -4283,7 +4157,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -4291,7 +4164,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -4304,7 +4176,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -4326,7 +4197,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -4453,8 +4323,7 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are - * following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * @@ -4495,8 +4364,7 @@ export default class ServiceFabricClient extends ServiceClient { * * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are - * following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * @@ -4819,7 +4687,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationTypeDefinitionKind * value Compose. The value is 2. * - * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -4886,7 +4753,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationTypeDefinitionKind * value Compose. The value is 2. * - * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -5097,7 +4963,6 @@ export default class ServiceFabricClient extends ServiceClient { * specified by the relativePathInImageStore, or by using the URI of the * external '.sfpkg'. * - * * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The * base type of provision application type description which supports either * image store-based provision or external store-based provision. @@ -5143,7 +5008,6 @@ export default class ServiceFabricClient extends ServiceClient { * specified by the relativePathInImageStore, or by using the URI of the * external '.sfpkg'. * - * * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The * base type of provision application type description which supports either * image store-based provision or external store-based provision. @@ -5571,7 +5435,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -5614,7 +5477,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -5677,7 +5539,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -5725,7 +5586,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -5800,7 +5660,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * 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 @@ -5867,7 +5726,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * 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 @@ -5942,7 +5800,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -5987,7 +5844,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -6048,7 +5904,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -6085,7 +5940,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -6150,7 +6004,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationDefinitionKind value * Compose. The value is 2. * - * * @param {string} [options.applicationTypeName] The application type name used * to filter the applications to query for. This value should not contain the * application type version. @@ -6217,7 +6070,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationDefinitionKind value * Compose. The value is 2. * - * * @param {string} [options.applicationTypeName] The application type name used * to filter the applications to query for. This value should not contain the * application type version. @@ -6293,7 +6145,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that @@ -6331,7 +6182,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that @@ -6387,7 +6237,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -6413,7 +6262,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -6438,7 +6286,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -6463,14 +6310,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -6502,7 +6347,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -6528,7 +6372,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -6553,7 +6396,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -6578,14 +6420,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -6638,7 +6478,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -6664,7 +6503,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -6689,7 +6527,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -6714,21 +6551,18 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -6745,7 +6579,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -6764,7 +6597,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -6779,7 +6611,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -6795,7 +6626,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -6833,7 +6663,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -6859,7 +6688,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -6884,7 +6712,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -6909,21 +6736,18 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -6940,7 +6764,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -6959,7 +6782,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -6974,7 +6796,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -6990,7 +6811,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -7045,7 +6865,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -7054,7 +6873,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -7062,7 +6880,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -7078,7 +6895,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -7097,7 +6913,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -7109,7 +6924,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -7117,7 +6931,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -7130,7 +6943,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -7152,7 +6964,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -7184,7 +6995,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -7193,7 +7003,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -7201,7 +7010,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -7217,7 +7025,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -7236,7 +7043,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -7248,7 +7054,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -7256,7 +7061,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -7269,7 +7073,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -7291,7 +7094,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -7340,7 +7142,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeDescription Parameters for an application * upgrade. * @@ -7387,8 +7188,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -7431,7 +7231,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -7449,7 +7248,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -7468,7 +7266,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -7483,7 +7280,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -7499,7 +7295,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -7537,7 +7332,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeDescription Parameters for an application * upgrade. * @@ -7584,8 +7378,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -7628,7 +7421,6 @@ export default class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -7646,7 +7438,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -7665,7 +7456,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -7680,7 +7470,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -7696,7 +7485,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -7752,7 +7540,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -7785,7 +7572,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -7841,7 +7627,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * @@ -7857,7 +7642,6 @@ export default class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -7875,7 +7659,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -7894,7 +7677,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -7909,7 +7691,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -7925,7 +7706,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -7963,8 +7743,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -8038,7 +7817,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * @@ -8054,7 +7832,6 @@ export default class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -8072,7 +7849,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -8091,7 +7867,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -8106,7 +7881,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -8122,7 +7896,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -8160,8 +7933,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -8252,7 +8024,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -8293,7 +8064,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -8354,7 +8124,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -8391,7 +8160,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -8439,7 +8207,6 @@ export default class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. @@ -8457,7 +8224,6 @@ export default class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {string} [options.continuationToken] 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 @@ -8496,7 +8262,6 @@ export default class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. @@ -8514,7 +8279,6 @@ export default class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {string} [options.continuationToken] 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 @@ -8574,7 +8338,6 @@ export default class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -8585,7 +8348,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -8601,7 +8363,6 @@ export default class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8625,7 +8386,6 @@ export default class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -8636,7 +8396,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -8652,7 +8411,6 @@ export default class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8704,7 +8462,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8730,7 +8487,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -8756,14 +8512,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -8800,7 +8554,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8826,7 +8579,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -8852,14 +8604,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -8911,7 +8661,6 @@ export default class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the deployed application. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -8922,7 +8671,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8948,7 +8696,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -8974,14 +8721,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -8998,7 +8743,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -9017,7 +8761,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -9032,7 +8775,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -9048,7 +8790,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -9059,7 +8800,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -9091,7 +8831,6 @@ export default class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the deployed application. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -9102,7 +8841,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -9128,7 +8866,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -9154,14 +8891,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -9178,7 +8913,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -9197,7 +8931,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -9212,7 +8945,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -9228,7 +8960,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -9239,7 +8970,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -9293,7 +9023,6 @@ export default class ServiceFabricClient extends ServiceClient { * application health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -9304,7 +9033,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -9312,7 +9040,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -9328,7 +9055,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -9347,7 +9073,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -9359,7 +9084,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -9367,7 +9091,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -9380,7 +9103,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -9402,7 +9124,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -9436,7 +9157,6 @@ export default class ServiceFabricClient extends ServiceClient { * application health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -9447,7 +9167,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -9455,7 +9174,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -9471,7 +9189,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -9490,7 +9207,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -9502,7 +9218,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -9510,7 +9225,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -9523,7 +9237,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -9545,7 +9258,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -9671,7 +9383,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -9716,7 +9427,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -9780,7 +9490,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -9789,7 +9498,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -9823,7 +9531,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -9832,7 +9539,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -9885,7 +9591,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -9919,7 +9624,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -9974,7 +9678,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceDescription The information necessary to create a * service. * @@ -10066,7 +9769,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceDescription The information necessary to create a * service. * @@ -10176,7 +9878,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * @@ -10236,7 +9937,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * @@ -10315,7 +10015,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -10358,7 +10057,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -10423,7 +10121,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -10461,7 +10158,6 @@ export default class ServiceFabricClient extends ServiceClient { * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value * is 1024. * - * * @param {string} [serviceUpdateDescription.placementConstraints] The * placement constraints as a string. Placement constraints are boolean * expressions on node properties and allow for restricting a service to @@ -10527,7 +10223,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -10565,7 +10260,6 @@ export default class ServiceFabricClient extends ServiceClient { * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value * is 1024. * - * * @param {string} [serviceUpdateDescription.placementConstraints] The * placement constraints as a string. Placement constraints are boolean * expressions on node properties and allow for restricting a service to @@ -10641,7 +10335,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -10674,7 +10367,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -10723,7 +10415,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -10732,7 +10423,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -10758,7 +10448,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -10783,14 +10472,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -10818,7 +10505,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -10827,7 +10513,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -10853,7 +10538,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -10878,14 +10562,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -10938,7 +10620,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -10947,7 +10628,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -10973,7 +10653,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -10998,14 +10677,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -11022,7 +10699,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -11041,7 +10717,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -11056,7 +10731,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -11072,7 +10746,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -11083,7 +10756,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11117,7 +10789,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -11126,7 +10797,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -11152,7 +10822,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -11177,14 +10846,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -11201,7 +10868,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -11220,7 +10886,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -11235,7 +10900,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -11251,7 +10915,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -11262,7 +10925,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11314,7 +10976,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -11323,7 +10984,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -11331,7 +10991,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -11347,7 +11006,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -11366,7 +11024,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -11378,7 +11035,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -11386,7 +11042,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -11399,7 +11054,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -11421,7 +11075,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11454,7 +11107,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -11463,7 +11115,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -11471,7 +11122,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -11487,7 +11137,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -11506,7 +11155,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -11518,7 +11166,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -11526,7 +11173,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -11539,7 +11185,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -11561,7 +11206,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11610,7 +11254,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] Key type for the partition. This @@ -11626,7 +11269,6 @@ export default class ServiceFabricClient extends ServiceClient { * the partition. This is valid for the partitions with partitioning scheme as * Named. The value is 3. * - * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. * @@ -11664,7 +11306,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] Key type for the partition. This @@ -11680,7 +11321,6 @@ export default class ServiceFabricClient extends ServiceClient { * the partition. This is valid for the partitions with partitioning scheme as * Named. The value is 3. * - * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. * @@ -11739,7 +11379,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -11781,7 +11420,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -11983,7 +11621,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -12011,7 +11648,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -12035,14 +11671,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12070,7 +11704,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -12098,7 +11731,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -12122,14 +11754,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12183,7 +11813,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -12211,7 +11840,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -12235,14 +11863,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -12259,7 +11885,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -12278,7 +11903,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -12293,7 +11917,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -12309,7 +11932,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -12320,7 +11942,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12355,7 +11976,6 @@ export default class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -12383,7 +12003,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -12407,14 +12026,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -12431,7 +12048,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -12450,7 +12066,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -12465,7 +12080,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -12481,7 +12095,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -12492,7 +12105,6 @@ export default class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12544,7 +12156,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetPartitionHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} healthInformation Describes the health information for the @@ -12554,7 +12165,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -12570,7 +12180,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -12589,7 +12198,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -12601,7 +12209,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -12609,7 +12216,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -12622,7 +12228,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -12644,7 +12249,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12677,7 +12281,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetPartitionHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} healthInformation Describes the health information for the @@ -12687,7 +12290,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -12703,7 +12305,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -12722,7 +12323,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -12734,7 +12334,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -12742,7 +12341,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -12755,7 +12353,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -12777,7 +12374,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12821,7 +12417,6 @@ export default class ServiceFabricClient extends ServiceClient { * Each report includes the load metric name, value, and last reported time in * UTC. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -12851,7 +12446,6 @@ export default class ServiceFabricClient extends ServiceClient { * Each report includes the load metric name, value, and last reported time in * UTC. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -13058,7 +12652,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -13095,7 +12688,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -13302,7 +12894,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -13317,12 +12908,10 @@ export default class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -13334,17 +12923,14 @@ export default class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -13359,7 +12945,6 @@ export default class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -13372,18 +12957,15 @@ export default class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -13468,7 +13050,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -13483,12 +13064,10 @@ export default class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -13500,17 +13079,14 @@ export default class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -13525,7 +13101,6 @@ export default class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -13538,18 +13113,15 @@ export default class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -13639,7 +13211,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskCancelDescription Describes the repair task to be * cancelled. * @@ -13675,7 +13246,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskCancelDescription Describes the repair task to be * cancelled. * @@ -13730,7 +13300,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskDeleteDescription Describes the repair task to be * deleted. * @@ -13761,7 +13330,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskDeleteDescription Describes the repair task to be * deleted. * @@ -13810,7 +13378,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.taskIdFilter] The repair task ID prefix to be @@ -13826,7 +13393,6 @@ export default class ServiceFabricClient extends ServiceClient { * - 32 - Restoring * - 64 - Completed * - * * @param {string} [options.executorFilter] The name of the repair executor * whose claimed tasks should be included in the list. * @@ -13847,7 +13413,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.taskIdFilter] The repair task ID prefix to be @@ -13863,7 +13428,6 @@ export default class ServiceFabricClient extends ServiceClient { * - 32 - Restoring * - 64 - Completed * - * * @param {string} [options.executorFilter] The name of the repair executor * whose claimed tasks should be included in the list. * @@ -13902,7 +13466,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskApproveDescription Describes the repair task to be * approved. * @@ -13933,7 +13496,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskApproveDescription Describes the repair task to be * approved. * @@ -13983,7 +13545,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair * task healthy policy to be updated. * @@ -14026,7 +13587,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair * task healthy policy to be updated. * @@ -14088,7 +13648,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -14103,12 +13662,10 @@ export default class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -14120,17 +13677,14 @@ export default class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -14145,7 +13699,6 @@ export default class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -14158,18 +13711,15 @@ export default class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -14240,7 +13790,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -14255,12 +13804,10 @@ export default class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -14272,17 +13819,14 @@ export default class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -14297,7 +13841,6 @@ export default class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -14310,18 +13853,15 @@ export default class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -14579,7 +14119,6 @@ export default class ServiceFabricClient extends ServiceClient { * Use EventsHealthStateFilter to filter the collection of health events * reported on the replica based on the health state. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -14609,7 +14148,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -14634,7 +14172,6 @@ export default class ServiceFabricClient extends ServiceClient { * Use EventsHealthStateFilter to filter the collection of health events * reported on the replica based on the health state. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -14664,7 +14201,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -14713,7 +14249,6 @@ export default class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the replica. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -14743,14 +14278,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -14767,7 +14300,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -14786,7 +14318,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -14801,7 +14332,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -14817,7 +14347,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -14851,7 +14380,6 @@ export default class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the replica. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -14881,14 +14409,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -14905,7 +14431,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -14924,7 +14449,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -14939,7 +14463,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -14955,7 +14478,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -15011,7 +14533,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetReplicaHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -15027,7 +14548,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -15043,7 +14563,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -15062,7 +14581,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -15074,7 +14592,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -15082,7 +14599,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -15095,7 +14611,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -15117,7 +14632,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -15150,7 +14664,6 @@ export default class ServiceFabricClient extends ServiceClient { * GetReplicaHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -15166,7 +14679,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -15182,7 +14694,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -15201,7 +14712,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -15213,7 +14723,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -15221,7 +14730,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -15234,7 +14742,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -15256,7 +14763,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -15311,7 +14817,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -15355,7 +14860,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -15764,7 +15268,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -15800,7 +15303,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -15856,7 +15358,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -15896,7 +15397,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -15954,7 +15454,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -15982,7 +15481,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -16018,7 +15516,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -16046,7 +15543,6 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -16097,7 +15593,6 @@ export default class ServiceFabricClient extends ServiceClient { * the fields are ignored while evaluating the health of the deployed service * package. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -16108,7 +15603,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -16136,14 +15630,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -16160,7 +15652,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -16179,7 +15670,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -16194,7 +15684,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -16210,7 +15699,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -16245,7 +15733,6 @@ export default class ServiceFabricClient extends ServiceClient { * the fields are ignored while evaluating the health of the deployed service * package. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -16256,7 +15743,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -16284,14 +15770,12 @@ export default class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -16308,7 +15792,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -16327,7 +15810,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -16342,7 +15824,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -16358,7 +15839,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -16416,7 +15896,6 @@ export default class ServiceFabricClient extends ServiceClient { * service package health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -16427,7 +15906,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -16437,7 +15915,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -16453,7 +15930,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -16472,7 +15948,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -16484,7 +15959,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -16492,7 +15966,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -16505,7 +15978,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -16527,7 +15999,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -16561,7 +16032,6 @@ export default class ServiceFabricClient extends ServiceClient { * service package health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -16572,7 +16042,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -16582,7 +16051,6 @@ export default class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -16598,7 +16066,6 @@ export default class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -16617,7 +16084,6 @@ export default class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -16629,7 +16095,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -16637,7 +16102,6 @@ export default class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -16650,7 +16114,6 @@ export default class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -16672,7 +16135,6 @@ export default class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -16718,7 +16180,6 @@ export default class ServiceFabricClient extends ServiceClient { * and upgrade, thus significantly reducing the total time required for the * deployment or upgrade. * - * * @param {string} nodeName The name of the node. * * @param {object} deployServicePackageToNodeDescription Describes information @@ -16768,7 +16229,6 @@ export default class ServiceFabricClient extends ServiceClient { * and upgrade, thus significantly reducing the total time required for the * deployment or upgrade. * - * * @param {string} nodeName The name of the node. * * @param {object} deployServicePackageToNodeDescription Describes information @@ -16841,7 +16301,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -16883,7 +16342,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -16945,7 +16403,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * @@ -16960,7 +16417,6 @@ export default class ServiceFabricClient extends ServiceClient { * 'SharedProcess'), then value of ServicePackageActivationId * is always an empty string. * - * * @param {string} restartDeployedCodePackageDescription.codePackageName The * name of the code package defined in the service manifest. * @@ -16976,7 +16432,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -17013,7 +16468,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * @@ -17028,7 +16482,6 @@ export default class ServiceFabricClient extends ServiceClient { * 'SharedProcess'), then value of ServicePackageActivationId * is always an empty string. * - * * @param {string} restartDeployedCodePackageDescription.codePackageName The * name of the code package defined in the service manifest. * @@ -17044,7 +16497,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -17098,7 +16550,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -17147,7 +16598,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -17215,7 +16665,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -17276,7 +16725,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -17850,8 +17298,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -17895,7 +17342,6 @@ export default class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -17913,7 +17359,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -17932,7 +17377,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -17947,7 +17391,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -17963,7 +17406,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -18052,8 +17494,7 @@ export default class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -18097,7 +17538,6 @@ export default class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -18115,7 +17555,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -18134,7 +17573,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -18149,7 +17587,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -18165,7 +17602,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -18214,7 +17650,6 @@ export default class ServiceFabricClient extends ServiceClient { * Chaos parameters used for running Chaos and the status of the Chaos * Schedule. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18240,7 +17675,6 @@ export default class ServiceFabricClient extends ServiceClient { * Chaos parameters used for running Chaos and the status of the Chaos * Schedule. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18289,7 +17723,6 @@ export default class ServiceFabricClient extends ServiceClient { * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) * for more details. * - * * @param {object} chaosParameters Describes all the parameters to configure a * Chaos run. * @@ -18297,7 +17730,6 @@ export default class ServiceFabricClient extends ServiceClient { * for which Chaos will run before automatically stopping. The maximum allowed * value is 4,294,967,295 (System.UInt32.MaxValue). * - * * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] * 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 @@ -18306,7 +17738,6 @@ export default class ServiceFabricClient extends ServiceClient { * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed * event. * - * * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is * the maximum number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -18316,11 +17747,9 @@ export default class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value of 2 or 3 and to exercise * caution while moving up. * - * * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or * disables the move primary and move secondary faults. * - * * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time * (in seconds) between consecutive faults within a single iteration. * The larger the value, the lower the overlapping between faults and the @@ -18328,19 +17757,16 @@ export default class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value between 1 and 5 and exercise * caution while moving up. * - * * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * - * * @param {object} [chaosParameters.clusterHealthPolicy] 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. * - * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -18362,7 +17788,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The * maximum allowed percentage of unhealthy applications before reporting an @@ -18380,7 +17805,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines * a map with max percentage unhealthy applications for specific application @@ -18406,7 +17830,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} [chaosParameters.context] Describes a map, which is a * collection of (string, string) type key-value pairs. The map can be used to * record information about @@ -18415,11 +17838,9 @@ export default class ServiceFabricClient extends ServiceClient { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @param {object} [chaosParameters.context.map] Describes a map that contains * a collection of ChaosContextMapItem's. * - * * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities * to target for Chaos faults. * This filter can be used to target Chaos faults only to certain node types or @@ -18428,7 +17849,6 @@ export default class ServiceFabricClient extends ServiceClient { * If ChaosTargetFilter is used, Chaos faults only the entities that meet the * ChaosTargetFilter specification. * - * * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A * list of node types to include in Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -18444,7 +17864,6 @@ export default class ServiceFabricClient extends ServiceClient { * number, a config upgrade is required for * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] * A list of application URI's to include in Chaos faults. * All replicas belonging to services of these applications are amenable to @@ -18462,7 +17881,6 @@ export default class ServiceFabricClient extends ServiceClient { * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18492,7 +17910,6 @@ export default class ServiceFabricClient extends ServiceClient { * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) * for more details. * - * * @param {object} chaosParameters Describes all the parameters to configure a * Chaos run. * @@ -18500,7 +17917,6 @@ export default class ServiceFabricClient extends ServiceClient { * for which Chaos will run before automatically stopping. The maximum allowed * value is 4,294,967,295 (System.UInt32.MaxValue). * - * * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] * 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 @@ -18509,7 +17925,6 @@ export default class ServiceFabricClient extends ServiceClient { * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed * event. * - * * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is * the maximum number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -18519,11 +17934,9 @@ export default class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value of 2 or 3 and to exercise * caution while moving up. * - * * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or * disables the move primary and move secondary faults. * - * * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time * (in seconds) between consecutive faults within a single iteration. * The larger the value, the lower the overlapping between faults and the @@ -18531,19 +17944,16 @@ export default class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value between 1 and 5 and exercise * caution while moving up. * - * * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * - * * @param {object} [chaosParameters.clusterHealthPolicy] 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. * - * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -18565,7 +17975,6 @@ export default class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The * maximum allowed percentage of unhealthy applications before reporting an @@ -18583,7 +17992,6 @@ export default class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines * a map with max percentage unhealthy applications for specific application @@ -18609,7 +18017,6 @@ export default class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} [chaosParameters.context] Describes a map, which is a * collection of (string, string) type key-value pairs. The map can be used to * record information about @@ -18618,11 +18025,9 @@ export default class ServiceFabricClient extends ServiceClient { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @param {object} [chaosParameters.context.map] Describes a map that contains * a collection of ChaosContextMapItem's. * - * * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities * to target for Chaos faults. * This filter can be used to target Chaos faults only to certain node types or @@ -18631,7 +18036,6 @@ export default class ServiceFabricClient extends ServiceClient { * If ChaosTargetFilter is used, Chaos faults only the entities that meet the * ChaosTargetFilter specification. * - * * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A * list of node types to include in Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -18647,7 +18051,6 @@ export default class ServiceFabricClient extends ServiceClient { * number, a config upgrade is required for * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] * A list of application URI's to include in Chaos faults. * All replicas belonging to services of these applications are amenable to @@ -18665,7 +18068,6 @@ export default class ServiceFabricClient extends ServiceClient { * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18713,7 +18115,6 @@ export default class ServiceFabricClient extends ServiceClient { * to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in * order to resume scheduling. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18743,7 +18144,6 @@ export default class ServiceFabricClient extends ServiceClient { * to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in * order to resume scheduling. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -18794,7 +18194,6 @@ export default class ServiceFabricClient extends ServiceClient { * to get the next segment you make a call to this API with the continuation * token. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -18855,7 +18254,6 @@ export default class ServiceFabricClient extends ServiceClient { * to get the next segment you make a call to this API with the continuation * token. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -18927,7 +18325,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the version of the Chaos Schedule in use and the Chaos Schedule that * defines when and how to run Chaos. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -18947,7 +18344,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the version of the Chaos Schedule in use and the Chaos Schedule that * defines when and how to run Chaos. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -18995,7 +18391,6 @@ export default class ServiceFabricClient extends ServiceClient { * incremented up by one and wraps back to 0 after 2,147,483,647. * If Chaos is running when this call is made, the call will fail. * - * * @param {object} chaosSchedule Describes the schedule used by Chaos. * * @param {number} [chaosSchedule.version] The version number of the Schedule. @@ -19005,19 +18400,15 @@ export default class ServiceFabricClient extends ServiceClient { * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos * will start using this schedule. * - * * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos * will continue to use this schedule until. * - * * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * - * * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule * Jobs that will be automated by the schedule. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -19045,7 +18436,6 @@ export default class ServiceFabricClient extends ServiceClient { * incremented up by one and wraps back to 0 after 2,147,483,647. * If Chaos is running when this call is made, the call will fail. * - * * @param {object} chaosSchedule Describes the schedule used by Chaos. * * @param {number} [chaosSchedule.version] The version number of the Schedule. @@ -19055,19 +18445,15 @@ export default class ServiceFabricClient extends ServiceClient { * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos * will start using this schedule. * - * * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos * will continue to use this schedule until. * - * * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * - * * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule * Jobs that will be automated by the schedule. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -19114,7 +18500,6 @@ export default class ServiceFabricClient extends ServiceClient { * upload it last, to let the image store service know that the folder is * complete. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19151,7 +18536,6 @@ export default class ServiceFabricClient extends ServiceClient { * upload it last, to let the image store service know that the folder is * complete. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19513,7 +18897,6 @@ export default class ServiceFabricClient extends ServiceClient { * The DELETE request will cause the existing upload session to expire and * remove any previously uploaded file chunks. * - * * @param {uuid} sessionId 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. @@ -19542,7 +18925,6 @@ export default class ServiceFabricClient extends ServiceClient { * The DELETE request will cause the existing upload session to expire and * remove any previously uploaded file chunks. * - * * @param {uuid} sessionId 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. @@ -19591,7 +18973,6 @@ export default class ServiceFabricClient extends ServiceClient { * upload session until the expiration time, which is 30 minutes after the last * chunk received. * - * * @param {uuid} sessionId 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. @@ -19622,7 +19003,6 @@ export default class ServiceFabricClient extends ServiceClient { * upload session until the expiration time, which is 30 minutes after the last * chunk received. * - * * @param {uuid} sessionId 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. @@ -19669,7 +19049,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the image store upload session identified by the given ID. User can * query the upload session at any time during uploading. * - * * @param {uuid} sessionId 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. @@ -19698,7 +19077,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the image store upload session identified by the given ID. User can * query the upload session at any time during uploading. * - * * @param {uuid} sessionId 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. @@ -19747,7 +19125,6 @@ export default class ServiceFabricClient extends ServiceClient { * relative path. User can query the upload session at any time during * uploading. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19776,7 +19153,6 @@ export default class ServiceFabricClient extends ServiceClient { * relative path. User can query the upload session at any time during * uploading. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19832,7 +19208,6 @@ export default class ServiceFabricClient extends ServiceClient { * image store relative path already exists, it will be overwritten when the * upload session commits. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19880,7 +19255,6 @@ export default class ServiceFabricClient extends ServiceClient { * image store relative path already exists, it will be overwritten when the * upload session commits. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -19948,7 +19322,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -19992,7 +19365,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -20054,7 +19426,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -20098,7 +19469,6 @@ export default class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -20168,7 +19538,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call the GetDataLossProgress API with the same OperationId to return * information on the operation started with this API. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20177,7 +19546,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20230,7 +19598,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call the GetDataLossProgress API with the same OperationId to return * information on the operation started with this API. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20239,7 +19606,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20292,7 +19658,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a data loss operation started with StartDataLoss, using * the OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20301,7 +19666,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20332,7 +19696,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a data loss operation started with StartDataLoss, using * the OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20341,7 +19704,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20398,7 +19760,6 @@ export default class ServiceFabricClient extends ServiceClient { * services. Do not use this API on stateless services or stateful in-memory * only services. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20407,7 +19768,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20451,7 +19811,6 @@ export default class ServiceFabricClient extends ServiceClient { * services. Do not use this API on stateless services or stateful in-memory * only services. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20460,7 +19819,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20516,7 +19874,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a quorum loss operation started with StartQuorumLoss, * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20525,7 +19882,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20556,7 +19912,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a quorum loss operation started with StartQuorumLoss, * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20565,7 +19920,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20621,7 +19975,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call the GetPartitionRestartProgress API using the same OperationId to get * the progress. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20630,7 +19983,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20670,7 +20022,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call the GetPartitionRestartProgress API using the same OperationId to get * the progress. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20679,7 +20030,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20732,7 +20082,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a PartitionRestart started with StartPartitionRestart * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20741,7 +20090,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20772,7 +20120,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of a PartitionRestart started with StartPartitionRestart * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -20781,7 +20128,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20837,7 +20183,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call GetNodeTransitionProgress with the same OperationId to get the progress * of the operation. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20885,7 +20230,6 @@ export default class ServiceFabricClient extends ServiceClient { * Call GetNodeTransitionProgress with the same OperationId to get the progress * of the operation. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20946,7 +20290,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of an operation started with StartNodeTransition using the * provided OperationId. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -20977,7 +20320,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the progress of an operation started with StartNodeTransition using the * provided OperationId. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -21035,7 +20377,6 @@ export default class ServiceFabricClient extends ServiceClient { * 4 - select PartitionRestart. * 8 - select NodeTransition. * - * * @param {number} stateFilter Used to filter on OperationState's for * user-induced operations. * 65535 - select All @@ -21046,7 +20387,6 @@ export default class ServiceFabricClient extends ServiceClient { * 32 - select Cancelled * 64 - select ForceCancelled * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -21079,7 +20419,6 @@ export default class ServiceFabricClient extends ServiceClient { * 4 - select PartitionRestart. * 8 - select NodeTransition. * - * * @param {number} stateFilter Used to filter on OperationState's for * user-induced operations. * 65535 - select All @@ -21090,7 +20429,6 @@ export default class ServiceFabricClient extends ServiceClient { * 32 - select Cancelled * 64 - select ForceCancelled * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -21158,7 +20496,6 @@ export default class ServiceFabricClient extends ServiceClient { * Important note: if this API is invoked with force==true, internal state may * be left behind. * - * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * @@ -21214,7 +20551,6 @@ export default class ServiceFabricClient extends ServiceClient { * Important note: if this API is invoked with force==true, internal state may * be left behind. * - * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * @@ -21263,7 +20599,6 @@ export default class ServiceFabricClient extends ServiceClient { * Creates a backup policy which can be associated later with a Service Fabric * application, service or a partition for periodic backup. * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -21282,7 +20617,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -21322,7 +20656,6 @@ export default class ServiceFabricClient extends ServiceClient { * Creates a backup policy which can be associated later with a Service Fabric * application, service or a partition for periodic backup. * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -21341,7 +20674,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -21401,7 +20733,6 @@ export default class ServiceFabricClient extends ServiceClient { * Service Fabric application, service or partition, cannot be deleted without * first deleting the mapping. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21430,7 +20761,6 @@ export default class ServiceFabricClient extends ServiceClient { * Service Fabric application, service or partition, cannot be deleted without * first deleting the mapping. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21474,7 +20804,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Get a list of all the backup policies configured. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -21514,7 +20843,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Get a list of all the backup policies configured. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -21574,7 +20902,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Gets a particular backup policy identified by {backupPolicyName} * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21600,7 +20927,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Gets a particular backup policy identified by {backupPolicyName} * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21648,7 +20974,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns a list of Service Fabric application, service or partition which are * associated with this backup policy. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21692,7 +21017,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns a list of Service Fabric application, service or partition which are * associated with this backup policy. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -21753,7 +21077,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Updates the backup policy identified by {backupPolicyName} * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -21772,7 +21095,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -21813,7 +21135,6 @@ export default class ServiceFabricClient extends ServiceClient { * * Updates the backup policy identified by {backupPolicyName} * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -21832,7 +21153,6 @@ export default class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -21896,7 +21216,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -21905,7 +21224,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -21940,7 +21258,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -21949,7 +21266,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -21998,7 +21314,6 @@ export default class ServiceFabricClient extends ServiceClient { * Disables periodic backup of Service Fabric application which was previously * enabled. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22007,7 +21322,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22032,7 +21346,6 @@ export default class ServiceFabricClient extends ServiceClient { * Disables periodic backup of Service Fabric application which was previously * enabled. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22041,7 +21354,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22085,7 +21397,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the application * and the services and partitions under this application. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22094,7 +21405,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -22136,7 +21446,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the application * and the services and partitions under this application. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22145,7 +21454,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -22210,7 +21518,6 @@ export default class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22219,7 +21526,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22277,7 +21583,6 @@ export default class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22286,7 +21591,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22370,7 +21674,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22406,7 +21709,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22458,7 +21760,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22492,7 +21793,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22542,7 +21842,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22551,7 +21850,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -22589,7 +21887,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22598,7 +21895,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -22651,7 +21947,6 @@ export default class ServiceFabricClient extends ServiceClient { * service is part of, this service would continue to be periodically backed up * as per the policy mapped at the application level. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22660,7 +21955,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22689,7 +21983,6 @@ export default class ServiceFabricClient extends ServiceClient { * service is part of, this service would continue to be periodically backed up * as per the policy mapped at the application level. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22698,7 +21991,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22741,7 +22033,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the service and * the partitions under this service. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22750,7 +22041,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -22791,7 +22081,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the service and * the partitions under this service. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22800,7 +22089,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -22865,7 +22153,6 @@ export default class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22874,7 +22161,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -22932,7 +22218,6 @@ export default class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -22941,7 +22226,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23024,7 +22308,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23059,7 +22342,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23111,7 +22393,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23145,7 +22426,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23193,7 +22473,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} enableBackupDescription Specifies the parameters for @@ -23231,7 +22510,6 @@ export default class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} enableBackupDescription Specifies the parameters for @@ -23286,7 +22564,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23317,7 +22594,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23362,7 +22638,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric Backup configuration information for the specified * partition. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23389,7 +22664,6 @@ export default class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric Backup configuration information for the specified * partition. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23438,7 +22712,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23480,7 +22753,6 @@ export default class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23687,7 +22959,6 @@ export default class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater backup timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23743,7 +23014,6 @@ export default class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater backup timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23811,7 +23081,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest backup along with details * or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23838,7 +23107,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest backup along with details * or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -23892,7 +23160,6 @@ export default class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater restore timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} restorePartitionDescription Describes the parameters to @@ -23952,7 +23219,6 @@ export default class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater restore timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} restorePartitionDescription Describes the parameters to @@ -24023,7 +23289,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest restore operation along * with details or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -24051,7 +23316,6 @@ export default class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest restore operation along * with details or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -24099,7 +23363,6 @@ export default class ServiceFabricClient extends ServiceClient { * (Application, Service or Partition) at the specified backup location * (FileShare or Azure Blob Storage). * - * * @param {object} getBackupByStorageQueryDescription Describes the filters and * backup storage details to be used for enumerating backups. * @@ -24176,7 +23439,6 @@ export default class ServiceFabricClient extends ServiceClient { * (Application, Service or Partition) at the specified backup location * (FileShare or Azure Blob Storage). * - * * @param {object} getBackupByStorageQueryDescription Describes the filters and * backup storage details to be used for enumerating backups. * @@ -25047,13 +24309,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25090,13 +24350,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25151,13 +24409,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25194,13 +24450,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25257,13 +24511,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25302,13 +24554,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25363,13 +24613,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25406,13 +24654,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25455,7 +24701,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -25476,13 +24721,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25507,7 +24750,6 @@ export default class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -25528,13 +24770,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25589,13 +24829,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25632,13 +24870,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25681,7 +24917,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -25702,13 +24937,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25733,7 +24966,6 @@ export default class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -25754,13 +24986,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25815,13 +25045,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25858,13 +25086,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25921,13 +25147,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -25966,13 +25190,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26027,13 +25249,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26070,13 +25290,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26135,13 +25353,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26182,13 +25398,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26245,13 +25459,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -26290,13 +25502,11 @@ export default class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * diff --git a/lib/services/serviceFabric/lib/serviceFabricClient.js b/lib/services/serviceFabric/lib/serviceFabricClient.js index 3dc167bd91..5baade9c4c 100644 --- a/lib/services/serviceFabric/lib/serviceFabricClient.js +++ b/lib/services/serviceFabric/lib/serviceFabricClient.js @@ -38,7 +38,6 @@ const models = require('./models'); * users are not expected to take a dependency on the format of the file * contents or its interpretation. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -187,7 +186,6 @@ function _getClusterManifest(options, callback) { * filter the collection of nodes and applications returned based on their * aggregated health state. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -213,7 +211,6 @@ function _getClusterManifest(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -240,7 +237,6 @@ function _getClusterManifest(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -264,14 +260,12 @@ function _getClusterManifest(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -283,7 +277,6 @@ function _getClusterManifest(options, callback) { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -468,7 +461,6 @@ function _getClusterHealth(options, callback) { * Use ClusterHealthPolicies to override the health policies used to evaluate * the health. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -494,7 +486,6 @@ function _getClusterHealth(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -521,7 +512,6 @@ function _getClusterHealth(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -545,14 +535,12 @@ function _getClusterHealth(options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -564,7 +552,6 @@ function _getClusterHealth(options, callback) { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {object} [options.clusterHealthPolicies] Describes the health * policies used to evaluate the cluster health. * If not present, the health evaluation uses the cluster health policy defined @@ -576,7 +563,6 @@ function _getClusterHealth(options, callback) { * an application, the specified application health policy * is used to evaluate the application health. * - * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * Defines a map that contains specific application health policies for * different applications. @@ -588,12 +574,10 @@ function _getClusterHealth(options, callback) { * defined in the manifest). * The map is empty by default. * - * * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -615,7 +599,6 @@ function _getClusterHealth(options, callback) { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -633,7 +616,6 @@ function _getClusterHealth(options, callback) { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -659,7 +641,6 @@ function _getClusterHealth(options, callback) { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -856,7 +837,6 @@ function _getClusterHealthUsingPolicy(options, callback) { * entities, use the POST URI and specify the cluster health chunk query * description. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -1012,7 +992,6 @@ function _getClusterHealthChunk(options, callback) { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.clusterHealthChunkQueryDescription] Describes the @@ -1037,7 +1016,6 @@ function _getClusterHealthChunk(options, callback) { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] * Defines a list of filters that specify which nodes to be included in the * returned cluster health chunk. @@ -1049,7 +1027,6 @@ function _getClusterHealthChunk(options, callback) { * Error and another filter to always include a node identified by its * NodeName. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a * list of filters that specify which applications to be included in the @@ -1062,13 +1039,11 @@ function _getClusterHealthChunk(options, callback) { * state Error and another filter to always include applications of a specified * application type. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a * health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -1090,7 +1065,6 @@ function _getClusterHealthChunk(options, callback) { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -1108,7 +1082,6 @@ function _getClusterHealthChunk(options, callback) { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -1134,13 +1107,11 @@ function _getClusterHealthChunk(options, callback) { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -1313,7 +1284,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * GetClusterHealth and check that the report appears in the HealthEvents * section. * - * * @param {object} healthInformation 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. @@ -1321,7 +1291,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -1337,7 +1306,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -1356,7 +1324,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -1368,7 +1335,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -1376,7 +1342,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -1389,7 +1354,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -1411,7 +1375,6 @@ function _getClusterHealthChunkUsingPolicyAndAdvancedFilters(options, callback) * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -2044,7 +2007,6 @@ function _getClusterUpgradeProgress(options, callback) { * types on the cluster, * security configurations, fault and upgrade domain topologies, etc. * - * * @param {string} configurationApiVersion The API version of the Standalone * cluster json configuration. * @@ -2197,7 +2159,6 @@ function _getClusterConfiguration(configurationApiVersion, options, callback) { * Get the cluster configuration upgrade status details of a Service Fabric * standalone cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -3281,8 +3242,7 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -3325,7 +3285,6 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -3347,7 +3306,6 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -3365,7 +3323,6 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -3391,7 +3348,6 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -3424,7 +3380,6 @@ function _resumeClusterUpgrade(resumeClusterUpgradeDescription, options, callbac * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -3802,8 +3757,7 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -3846,7 +3800,6 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -3868,7 +3821,6 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -3886,7 +3838,6 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -3912,7 +3863,6 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -3945,7 +3895,6 @@ function _startClusterConfigurationUpgrade(clusterConfigurationUpgradeDescriptio * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -4098,7 +4047,6 @@ function _updateClusterUpgrade(updateClusterUpgradeDescription, options, callbac * needed to set up an Azure Active Directory secured connection with a Service * Fabric cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -4596,7 +4544,6 @@ function _getNodeInfo(nodeName, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -4781,7 +4728,6 @@ function _getNodeHealth(nodeName, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.clusterHealthPolicy] 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 @@ -4806,7 +4752,6 @@ function _getNodeHealth(nodeName, options, callback) { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum * allowed percentage of unhealthy applications before reporting an error. For @@ -4824,7 +4769,6 @@ function _getNodeHealth(nodeName, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific * application types. @@ -4849,7 +4793,6 @@ function _getNodeHealth(nodeName, options, callback) { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -5027,7 +4970,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * To see whether the report was applied in the health store, run GetNodeHealth * and check that the report appears in the HealthEvents section. * - * * @param {string} nodeName The name of the node. * * @param {object} healthInformation Describes the health information for the @@ -5037,7 +4979,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -5053,7 +4994,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -5072,7 +5012,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -5084,7 +5023,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -5092,7 +5030,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -5105,7 +5042,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -5127,7 +5063,6 @@ function _getNodeHealthUsingPolicy(nodeName, options, callback) { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -5445,8 +5380,7 @@ function _getNodeLoadInfo(nodeName, options, callback) { * * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are - * following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * @@ -6055,7 +5989,6 @@ function _restartNode(nodeName, restartNodeDescription, options, callback) { * - Compose - Filter that matches input with ApplicationTypeDefinitionKind * value Compose. The value is 2. * - * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -6478,7 +6411,6 @@ function _getApplicationTypeInfoListByName(applicationTypeName, options, callbac * specified by the relativePathInImageStore, or by using the URI of the * external '.sfpkg'. * - * * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The * base type of provision application type description which supports either * image store-based provision or external store-based provision. @@ -7320,202 +7252,200 @@ function _getServiceManifest(applicationTypeName, applicationTypeVersion, servic * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.serviceManifestName] 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. - * - * @param {number} [options.timeout] The server timeout for performing the - * operation in seconds. This timeout specifies the time duration that the - * client is willing to wait for the requested operation to complete. The - * default value for this parameter is 60 seconds. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {array} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callback) { - /* jshint validthis: true */ - let client = this; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let serviceManifestName = (options && options.serviceManifestName !== undefined) ? options.serviceManifestName : undefined; - let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; - let apiVersion = '6.0'; - // Validate - try { - if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { - throw new Error('nodeName cannot be null or undefined and it must be of type string.'); - } - if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { - throw new Error('applicationId cannot be null or undefined and it must be of type string.'); - } - if (serviceManifestName !== null && serviceManifestName !== undefined && typeof serviceManifestName.valueOf() !== 'string') { - throw new Error('serviceManifestName must be of type string.'); - } - if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { - throw new Error('timeout must be of type number.'); - } - if (timeout !== null && timeout !== undefined) { - if (timeout > 4294967295) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); - } - if (timeout < 1) - { - throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); - } - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'; - requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); - requestUrl = requestUrl.replace('{applicationId}', applicationId); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (serviceManifestName !== null && serviceManifestName !== undefined) { - queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); - } - if (timeout !== null && timeout !== undefined) { - queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['FabricError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'DeployedServiceTypeInfoElementType', - type: { - name: 'Composite', - className: 'DeployedServiceTypeInfo' - } - } - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * @summary 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 {string} nodeName The name of the node. - * - * @param {string} applicationId The identity of the application. This is - * typically the full name of the application without the 'fabric:' URI scheme. - * Starting from version 6.0, hierarchical names are delimited with the "~" - * character. - * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric - * service type. + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.serviceManifestName] 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. + * + * @param {number} [options.timeout] The server timeout for performing the + * operation in seconds. This timeout specifies the time duration that the + * client is willing to wait for the requested operation to complete. The + * default value for this parameter is 60 seconds. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {array} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getDeployedServiceTypeInfoList(nodeName, applicationId, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let serviceManifestName = (options && options.serviceManifestName !== undefined) ? options.serviceManifestName : undefined; + let timeout = (options && options.timeout !== undefined) ? options.timeout : 60; + let apiVersion = '6.0'; + // Validate + try { + if (nodeName === null || nodeName === undefined || typeof nodeName.valueOf() !== 'string') { + throw new Error('nodeName cannot be null or undefined and it must be of type string.'); + } + if (applicationId === null || applicationId === undefined || typeof applicationId.valueOf() !== 'string') { + throw new Error('applicationId cannot be null or undefined and it must be of type string.'); + } + if (serviceManifestName !== null && serviceManifestName !== undefined && typeof serviceManifestName.valueOf() !== 'string') { + throw new Error('serviceManifestName must be of type string.'); + } + if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') { + throw new Error('timeout must be of type number.'); + } + if (timeout !== null && timeout !== undefined) { + if (timeout > 4294967295) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMaximum": 4294967295'); + } + if (timeout < 1) + { + throw new Error('"timeout" should satisfy the constraint - "InclusiveMinimum": 1'); + } + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes'; + requestUrl = requestUrl.replace('{nodeName}', encodeURIComponent(nodeName)); + requestUrl = requestUrl.replace('{applicationId}', applicationId); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (serviceManifestName !== null && serviceManifestName !== undefined) { + queryParameters.push('ServiceManifestName=' + encodeURIComponent(serviceManifestName)); + } + if (timeout !== null && timeout !== undefined) { + queryParameters.push('timeout=' + encodeURIComponent(timeout.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['FabricError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DeployedServiceTypeInfoElementType', + type: { + name: 'Composite', + className: 'DeployedServiceTypeInfo' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary 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 {string} nodeName The name of the node. + * + * @param {string} applicationId The identity of the application. This is + * typically the full name of the application without the 'fabric:' URI scheme. + * Starting from version 6.0, hierarchical names are delimited with the "~" + * character. + * For example, 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 {string} serviceTypeName Specifies the name of a Service Fabric + * service type. * * @param {object} [options] Optional Parameters. * @@ -7722,7 +7652,6 @@ function _getDeployedServiceTypeInfoByName(nodeName, applicationId, serviceTypeN * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * 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 @@ -7898,7 +7827,6 @@ function _createApplication(applicationDescription, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -8054,7 +7982,6 @@ function _deleteApplication(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -8224,7 +8151,6 @@ function _getApplicationLoadInfo(applicationId, options, callback) { * - Compose - Filter that matches input with ApplicationDefinitionKind value * Compose. The value is 2. * - * * @param {string} [options.applicationTypeName] The application type name used * to filter the applications to query for. This value should not contain the * application type version. @@ -8442,7 +8368,6 @@ function _getApplicationInfoList(options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that @@ -8610,7 +8535,6 @@ function _getApplicationInfo(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8636,7 +8560,6 @@ function _getApplicationInfo(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -8661,7 +8584,6 @@ function _getApplicationInfo(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -8686,14 +8608,12 @@ function _getApplicationInfo(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -8879,7 +8799,6 @@ function _getApplicationHealth(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -8905,7 +8824,6 @@ function _getApplicationHealth(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -8930,7 +8848,6 @@ function _getApplicationHealth(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -8955,21 +8872,18 @@ function _getApplicationHealth(applicationId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -8986,7 +8900,6 @@ function _getApplicationHealth(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -9005,7 +8918,6 @@ function _getApplicationHealth(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -9020,7 +8932,6 @@ function _getApplicationHealth(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -9036,7 +8947,6 @@ function _getApplicationHealth(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -9239,7 +9149,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -9248,7 +9157,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -9256,7 +9164,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -9272,7 +9179,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -9291,7 +9197,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -9303,7 +9208,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -9311,7 +9215,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -9324,7 +9227,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -9346,7 +9248,6 @@ function _getApplicationHealthUsingPolicy(applicationId, options, callback) { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -9507,7 +9408,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeDescription Parameters for an application * upgrade. * @@ -9554,8 +9454,7 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -9598,7 +9497,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -9616,7 +9514,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -9635,7 +9532,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -9650,7 +9546,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -9666,7 +9561,6 @@ function _reportApplicationHealth(applicationId, healthInformation, options, cal * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -9827,7 +9721,6 @@ function _startApplicationUpgrade(applicationId, applicationUpgradeDescription, * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -9988,7 +9881,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * @@ -10004,7 +9896,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -10022,7 +9913,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -10041,7 +9931,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -10056,7 +9945,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -10072,7 +9960,6 @@ function _getApplicationUpgrade(applicationId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -10110,8 +9997,7 @@ function _getApplicationUpgrade(applicationId, options, callback) { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -10307,7 +10193,6 @@ function _updateApplicationUpgrade(applicationId, applicationUpgradeUpdateDescri * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -10473,7 +10358,6 @@ function _resumeApplicationUpgrade(applicationId, resumeApplicationUpgradeDescri * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -10609,7 +10493,6 @@ function _rollbackApplicationUpgrade(applicationId, options, callback) { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. @@ -10627,7 +10510,6 @@ function _rollbackApplicationUpgrade(applicationId, options, callback) { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {string} [options.continuationToken] 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 @@ -10819,7 +10701,6 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -10830,7 +10711,6 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -10846,7 +10726,6 @@ function _getDeployedApplicationInfoList(nodeName, options, callback) { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -11014,7 +10893,6 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -11040,7 +10918,6 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -11066,14 +10943,12 @@ function _getDeployedApplicationInfo(nodeName, applicationId, options, callback) * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11255,7 +11130,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the deployed application. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -11266,7 +11140,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -11292,7 +11165,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -11318,14 +11190,12 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -11342,7 +11212,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -11361,7 +11230,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -11376,7 +11244,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -11392,7 +11259,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -11403,7 +11269,6 @@ function _getDeployedApplicationHealth(nodeName, applicationId, options, callbac * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -11602,7 +11467,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * application health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -11613,7 +11477,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -11621,7 +11484,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -11637,7 +11499,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -11656,7 +11517,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -11668,7 +11528,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -11676,7 +11535,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -11689,7 +11547,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -11711,7 +11568,6 @@ function _getDeployedApplicationHealthUsingPolicy(nodeName, applicationId, optio * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -12034,7 +11890,6 @@ function _getApplicationManifest(applicationTypeName, applicationTypeVersion, op * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -12217,7 +12072,6 @@ function _getServiceInfoList(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -12226,7 +12080,6 @@ function _getServiceInfoList(applicationId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -12388,7 +12241,6 @@ function _getServiceInfo(applicationId, serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -12548,7 +12400,6 @@ function _getApplicationNameInfo(serviceId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceDescription The information necessary to create a * service. * @@ -12763,7 +12614,6 @@ function _createService(applicationId, serviceDescription, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * @@ -12947,7 +12797,6 @@ function _createServiceFromTemplate(applicationId, serviceFromTemplateDescriptio * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -13107,7 +12956,6 @@ function _deleteService(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -13145,7 +12993,6 @@ function _deleteService(serviceId, options, callback) { * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value * is 1024. * - * * @param {string} [serviceUpdateDescription.placementConstraints] The * placement constraints as a string. Placement constraints are boolean * expressions on node properties and allow for restricting a service to @@ -13326,7 +13173,6 @@ function _updateService(serviceId, serviceUpdateDescription, options, callback) * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -13480,7 +13326,6 @@ function _getServiceDescription(serviceId, options, callback) { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -13489,7 +13334,6 @@ function _getServiceDescription(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -13515,7 +13359,6 @@ function _getServiceDescription(serviceId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -13540,14 +13383,12 @@ function _getServiceDescription(serviceId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -13726,7 +13567,6 @@ function _getServiceHealth(serviceId, options, callback) { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -13735,7 +13575,6 @@ function _getServiceHealth(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -13761,7 +13600,6 @@ function _getServiceHealth(serviceId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -13786,14 +13624,12 @@ function _getServiceHealth(serviceId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -13810,7 +13646,6 @@ function _getServiceHealth(serviceId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -13829,7 +13664,6 @@ function _getServiceHealth(serviceId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -13844,7 +13678,6 @@ function _getServiceHealth(serviceId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -13860,7 +13693,6 @@ function _getServiceHealth(serviceId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -13871,7 +13703,6 @@ function _getServiceHealth(serviceId, options, callback) { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -14064,7 +13895,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -14073,7 +13903,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -14081,7 +13910,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -14097,7 +13925,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -14116,7 +13943,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -14128,7 +13954,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -14136,7 +13961,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -14149,7 +13973,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -14171,7 +13994,6 @@ function _getServiceHealthUsingPolicy(serviceId, options, callback) { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -14332,7 +14154,6 @@ function _reportServiceHealth(serviceId, healthInformation, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] Key type for the partition. This @@ -14348,7 +14169,6 @@ function _reportServiceHealth(serviceId, healthInformation, options, callback) { * the partition. This is valid for the partitions with partitioning scheme as * Named. The value is 3. * - * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. * @@ -14533,7 +14353,6 @@ function _resolveService(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -15004,7 +14823,6 @@ function _getServiceNameInfo(partitionId, options, callback) { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -15032,7 +14850,6 @@ function _getServiceNameInfo(partitionId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -15056,14 +14873,12 @@ function _getServiceNameInfo(partitionId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -15243,7 +15058,6 @@ function _getPartitionHealth(partitionId, options, callback) { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -15271,7 +15085,6 @@ function _getPartitionHealth(partitionId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -15295,14 +15108,12 @@ function _getPartitionHealth(partitionId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -15319,7 +15130,6 @@ function _getPartitionHealth(partitionId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -15338,7 +15148,6 @@ function _getPartitionHealth(partitionId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -15353,7 +15162,6 @@ function _getPartitionHealth(partitionId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -15369,7 +15177,6 @@ function _getPartitionHealth(partitionId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -15380,7 +15187,6 @@ function _getPartitionHealth(partitionId, options, callback) { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -15573,7 +15379,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * GetPartitionHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} healthInformation Describes the health information for the @@ -15583,7 +15388,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -15599,7 +15403,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -15618,7 +15421,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -15630,7 +15432,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -15638,7 +15439,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -15651,7 +15451,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -15673,7 +15472,6 @@ function _getPartitionHealthUsingPolicy(partitionId, options, callback) { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -15829,7 +15627,6 @@ function _reportPartitionHealth(partitionId, healthInformation, options, callbac * Each report includes the load metric name, value, and last reported time in * UTC. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -16261,7 +16058,6 @@ function _recoverPartition(partitionId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -16667,7 +16463,6 @@ function _recoverAllPartitions(options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -16682,12 +16477,10 @@ function _recoverAllPartitions(options, callback) { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -16699,17 +16492,14 @@ function _recoverAllPartitions(options, callback) { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -16724,7 +16514,6 @@ function _recoverAllPartitions(options, callback) { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -16737,18 +16526,15 @@ function _recoverAllPartitions(options, callback) { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -16939,7 +16725,6 @@ function _createRepairTask(repairTask, options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskCancelDescription Describes the repair task to be * cancelled. * @@ -17095,7 +16880,6 @@ function _cancelRepairTask(repairTaskCancelDescription, options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskDeleteDescription Describes the repair task to be * deleted. * @@ -17228,7 +17012,6 @@ function _deleteRepairTask(repairTaskDeleteDescription, options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.taskIdFilter] The repair task ID prefix to be @@ -17244,7 +17027,6 @@ function _deleteRepairTask(repairTaskDeleteDescription, options, callback) { * - 32 - Restoring * - 64 - Completed * - * * @param {string} [options.executorFilter] The name of the repair executor * whose claimed tasks should be included in the list. * @@ -17402,7 +17184,6 @@ function _getRepairTaskList(options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskApproveDescription Describes the repair task to be * approved. * @@ -17553,7 +17334,6 @@ function _forceApproveRepairTask(repairTaskApproveDescription, options, callback * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair * task healthy policy to be updated. * @@ -17716,7 +17496,6 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -17731,12 +17510,10 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -17748,17 +17525,14 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -17773,7 +17547,6 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -17786,18 +17559,15 @@ function _updateRepairTaskHealthPolicy(repairTaskUpdateHealthPolicyDescription, * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -18313,7 +18083,6 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { * Use EventsHealthStateFilter to filter the collection of health events * reported on the replica based on the health state. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -18343,7 +18112,6 @@ function _getReplicaInfo(partitionId, replicaId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -18508,7 +18276,6 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the replica. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -18538,14 +18305,12 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -18562,7 +18327,6 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -18581,7 +18345,6 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -18596,7 +18359,6 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -18612,7 +18374,6 @@ function _getReplicaHealth(partitionId, replicaId, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -18799,7 +18560,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * GetReplicaHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -18815,7 +18575,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -18831,7 +18590,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -18850,7 +18608,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -18862,7 +18619,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -18870,7 +18626,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -18883,7 +18638,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -18905,7 +18659,6 @@ function _getReplicaHealthUsingPolicy(partitionId, replicaId, options, callback) * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -19080,7 +18833,6 @@ function _reportReplicaHealth(partitionId, replicaId, replicaHealthReportService * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -19915,7 +19667,6 @@ function _removeReplica(nodeName, partitionId, replicaId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -20094,7 +19845,6 @@ function _getDeployedServicePackageInfoList(nodeName, applicationId, options, ca * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -20279,7 +20029,6 @@ function _getDeployedServicePackageInfoListByName(nodeName, applicationId, servi * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -20307,7 +20056,6 @@ function _getDeployedServicePackageInfoListByName(nodeName, applicationId, servi * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -20478,7 +20226,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * the fields are ignored while evaluating the health of the deployed service * package. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -20489,7 +20236,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -20517,14 +20263,12 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -20541,7 +20285,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -20560,7 +20303,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -20575,7 +20317,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -20591,7 +20332,6 @@ function _getDeployedServicePackageHealth(nodeName, applicationId, servicePackag * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -20784,7 +20524,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * service package health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -20795,7 +20534,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -20805,7 +20543,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -20821,7 +20558,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -20840,7 +20576,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -20852,7 +20587,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -20860,7 +20594,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -20873,7 +20606,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -20895,7 +20627,6 @@ function _getDeployedServicePackageHealthUsingPolicy(nodeName, applicationId, se * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -21061,7 +20792,6 @@ function _reportDeployedServicePackageHealth(nodeName, applicationId, servicePac * and upgrade, thus significantly reducing the total time required for the * deployment or upgrade. * - * * @param {string} nodeName The name of the node. * * @param {object} deployServicePackageToNodeDescription Describes information @@ -21239,7 +20969,6 @@ function _deployServicePackageToNode(nodeName, deployServicePackageToNodeDescrip * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -21438,7 +21167,6 @@ function _getDeployedCodePackageInfoList(nodeName, applicationId, options, callb * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * @@ -21453,7 +21181,6 @@ function _getDeployedCodePackageInfoList(nodeName, applicationId, options, callb * 'SharedProcess'), then value of ServicePackageActivationId * is always an empty string. * - * * @param {string} restartDeployedCodePackageDescription.codePackageName The * name of the code package defined in the service manifest. * @@ -21469,7 +21196,6 @@ function _getDeployedCodePackageInfoList(nodeName, applicationId, options, callb * 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. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -21632,7 +21358,6 @@ function _restartDeployedCodePackage(nodeName, applicationId, restartDeployedCod * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -21831,7 +21556,6 @@ function _getContainerLogsDeployedOnNode(nodeName, applicationId, serviceManifes * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -22888,8 +22612,7 @@ function _removeComposeDeployment(deploymentName, options, callback) { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -22933,7 +22656,6 @@ function _removeComposeDeployment(deploymentName, options, callback) { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -22951,7 +22673,6 @@ function _removeComposeDeployment(deploymentName, options, callback) { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -22970,7 +22691,6 @@ function _removeComposeDeployment(deploymentName, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -22985,7 +22705,6 @@ function _removeComposeDeployment(deploymentName, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -23001,7 +22720,6 @@ function _removeComposeDeployment(deploymentName, options, callback) { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -23155,7 +22873,6 @@ function _startComposeDeploymentUpgrade(deploymentName, composeDeploymentUpgrade * Chaos parameters used for running Chaos and the status of the Chaos * Schedule. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23305,7 +23022,6 @@ function _getChaos(options, callback) { * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) * for more details. * - * * @param {object} chaosParameters Describes all the parameters to configure a * Chaos run. * @@ -23313,7 +23029,6 @@ function _getChaos(options, callback) { * for which Chaos will run before automatically stopping. The maximum allowed * value is 4,294,967,295 (System.UInt32.MaxValue). * - * * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] * 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 @@ -23322,7 +23037,6 @@ function _getChaos(options, callback) { * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed * event. * - * * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is * the maximum number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -23332,11 +23046,9 @@ function _getChaos(options, callback) { * The recommendation is to start with a value of 2 or 3 and to exercise * caution while moving up. * - * * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or * disables the move primary and move secondary faults. * - * * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time * (in seconds) between consecutive faults within a single iteration. * The larger the value, the lower the overlapping between faults and the @@ -23344,19 +23056,16 @@ function _getChaos(options, callback) { * The recommendation is to start with a value between 1 and 5 and exercise * caution while moving up. * - * * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * - * * @param {object} [chaosParameters.clusterHealthPolicy] 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. * - * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -23378,7 +23087,6 @@ function _getChaos(options, callback) { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The * maximum allowed percentage of unhealthy applications before reporting an @@ -23396,7 +23104,6 @@ function _getChaos(options, callback) { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines * a map with max percentage unhealthy applications for specific application @@ -23422,7 +23129,6 @@ function _getChaos(options, callback) { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} [chaosParameters.context] Describes a map, which is a * collection of (string, string) type key-value pairs. The map can be used to * record information about @@ -23431,11 +23137,9 @@ function _getChaos(options, callback) { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @param {object} [chaosParameters.context.map] Describes a map that contains * a collection of ChaosContextMapItem's. * - * * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities * to target for Chaos faults. * This filter can be used to target Chaos faults only to certain node types or @@ -23444,7 +23148,6 @@ function _getChaos(options, callback) { * If ChaosTargetFilter is used, Chaos faults only the entities that meet the * ChaosTargetFilter specification. * - * * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A * list of node types to include in Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -23460,7 +23163,6 @@ function _getChaos(options, callback) { * number, a config upgrade is required for * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] * A list of application URI's to include in Chaos faults. * All replicas belonging to services of these applications are amenable to @@ -23478,7 +23180,6 @@ function _getChaos(options, callback) { * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23627,7 +23328,6 @@ function _startChaos(chaosParameters, options, callback) { * to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in * order to resume scheduling. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -23762,7 +23462,6 @@ function _stopChaos(options, callback) { * to get the next segment you make a call to this API with the continuation * token. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -23969,7 +23668,6 @@ function _getChaosEvents(options, callback) { * Gets the version of the Chaos Schedule in use and the Chaos Schedule that * defines when and how to run Chaos. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -24096,7 +23794,6 @@ function _getChaosSchedule(options, callback) { * incremented up by one and wraps back to 0 after 2,147,483,647. * If Chaos is running when this call is made, the call will fail. * - * * @param {object} chaosSchedule Describes the schedule used by Chaos. * * @param {number} [chaosSchedule.version] The version number of the Schedule. @@ -24106,19 +23803,15 @@ function _getChaosSchedule(options, callback) { * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos * will start using this schedule. * - * * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos * will continue to use this schedule until. * - * * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * - * * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule * Jobs that will be automated by the schedule. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -24249,7 +23942,6 @@ function _postChaosSchedule(chaosSchedule, options, callback) { * upload it last, to let the image store service know that the folder is * complete. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -24973,7 +24665,6 @@ function _copyImageStoreContent(imageStoreCopyDescription, options, callback) { * The DELETE request will cause the existing upload session to expire and * remove any previously uploaded file chunks. * - * * @param {uuid} sessionId 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. @@ -25110,7 +24801,6 @@ function _deleteImageStoreUploadSession(sessionId, options, callback) { * upload session until the expiration time, which is 30 minutes after the last * chunk received. * - * * @param {uuid} sessionId 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. @@ -25245,7 +24935,6 @@ function _commitImageStoreUploadSession(sessionId, options, callback) { * Gets the image store upload session identified by the given ID. User can * query the upload session at any time during uploading. * - * * @param {uuid} sessionId 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. @@ -25399,7 +25088,6 @@ function _getImageStoreUploadSessionById(sessionId, options, callback) { * relative path. User can query the upload session at any time during * uploading. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -25560,7 +25248,6 @@ function _getImageStoreUploadSessionByPath(contentPath, options, callback) { * image store relative path already exists, it will be overwritten when the * upload session commits. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -25726,7 +25413,6 @@ function _uploadFileChunk(contentPath, sessionId, contentRange, options, callbac * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -25906,7 +25592,6 @@ function _invokeInfrastructureCommand(command, options, callback) { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -26094,7 +25779,6 @@ function _invokeInfrastructureQuery(command, options, callback) { * Call the GetDataLossProgress API with the same OperationId to return * information on the operation started with this API. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26103,7 +25787,6 @@ function _invokeInfrastructureQuery(command, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -26256,7 +25939,6 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio * Gets the progress of a data loss operation started with StartDataLoss, using * the OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26265,7 +25947,6 @@ function _startDataLoss(serviceId, partitionId, operationId, dataLossMode, optio * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -26435,7 +26116,6 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call * services. Do not use this API on stateless services or stateful in-memory * only services. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26444,7 +26124,6 @@ function _getDataLossProgress(serviceId, partitionId, operationId, options, call * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -26604,7 +26283,6 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q * Gets the progress of a quorum loss operation started with StartQuorumLoss, * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26613,7 +26291,6 @@ function _startQuorumLoss(serviceId, partitionId, operationId, quorumLossMode, q * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -26782,7 +26459,6 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca * Call the GetPartitionRestartProgress API using the same OperationId to get * the progress. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26791,7 +26467,6 @@ function _getQuorumLossProgress(serviceId, partitionId, operationId, options, ca * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -26944,7 +26619,6 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart * Gets the progress of a PartitionRestart started with StartPartitionRestart * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -26953,7 +26627,6 @@ function _startPartitionRestart(serviceId, partitionId, operationId, restartPart * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -27122,7 +26795,6 @@ function _getPartitionRestartProgress(serviceId, partitionId, operationId, optio * Call GetNodeTransitionProgress with the same OperationId to get the progress * of the operation. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -27293,7 +26965,6 @@ function _startNodeTransition(nodeName, operationId, nodeTransitionType, nodeIns * Gets the progress of an operation started with StartNodeTransition using the * provided OperationId. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -27460,7 +27131,6 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { * 4 - select PartitionRestart. * 8 - select NodeTransition. * - * * @param {number} stateFilter Used to filter on OperationState's for * user-induced operations. * 65535 - select All @@ -27471,7 +27141,6 @@ function _getNodeTransitionProgress(nodeName, operationId, options, callback) { * 32 - select Cancelled * 64 - select ForceCancelled * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -27662,7 +27331,6 @@ function _getFaultOperationList(typeFilter, stateFilter, options, callback) { * Important note: if this API is invoked with force==true, internal state may * be left behind. * - * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * @@ -27803,7 +27471,6 @@ function _cancelOperation(operationId, force, options, callback) { * Creates a backup policy which can be associated later with a Service Fabric * application, service or a partition for periodic backup. * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -27822,7 +27489,6 @@ function _cancelOperation(operationId, force, options, callback) { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -27983,7 +27649,6 @@ function _createBackupPolicy(backupPolicyDescription, options, callback) { * Service Fabric application, service or partition, cannot be deleted without * first deleting the mapping. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -28115,7 +27780,6 @@ function _deleteBackupPolicy(backupPolicyName, options, callback) { * * Get a list of all the backup policies configured. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -28296,7 +27960,6 @@ function _getBackupPolicyList(options, callback) { * * Gets a particular backup policy identified by {backupPolicyName} * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -28449,7 +28112,6 @@ function _getBackupPolicyByName(backupPolicyName, options, callback) { * Returns a list of Service Fabric application, service or partition which are * associated with this backup policy. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -28635,7 +28297,6 @@ function _getAllEntitiesBackedUpByPolicy(backupPolicyName, options, callback) { * * Updates the backup policy identified by {backupPolicyName} * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -28654,7 +28315,6 @@ function _getAllEntitiesBackedUpByPolicy(backupPolicyName, options, callback) { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -28823,7 +28483,6 @@ function _updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -28832,7 +28491,6 @@ function _updateBackupPolicy(backupPolicyDescription, backupPolicyName, options, * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -28986,7 +28644,6 @@ function _enableApplicationBackup(applicationId, enableBackupDescription, option * Disables periodic backup of Service Fabric application which was previously * enabled. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -28995,7 +28652,6 @@ function _enableApplicationBackup(applicationId, enableBackupDescription, option * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -29127,7 +28783,6 @@ function _disableApplicationBackup(applicationId, options, callback) { * Gets the Service Fabric backup configuration information for the application * and the services and partitions under this application. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -29136,7 +28791,6 @@ function _disableApplicationBackup(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -29326,7 +28980,6 @@ function _getApplicationBackupConfigurationInfo(applicationId, options, callback * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -29335,7 +28988,6 @@ function _getApplicationBackupConfigurationInfo(applicationId, options, callback * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -29567,7 +29219,6 @@ function _getApplicationBackupList(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -29707,7 +29358,6 @@ function _suspendApplicationBackup(applicationId, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -29845,7 +29495,6 @@ function _resumeApplicationBackup(applicationId, options, callback) { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -29854,7 +29503,6 @@ function _resumeApplicationBackup(applicationId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -30012,7 +29660,6 @@ function _enableServiceBackup(serviceId, enableBackupDescription, options, callb * service is part of, this service would continue to be periodically backed up * as per the policy mapped at the application level. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -30021,7 +29668,6 @@ function _enableServiceBackup(serviceId, enableBackupDescription, options, callb * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -30152,7 +29798,6 @@ function _disableServiceBackup(serviceId, options, callback) { * Gets the Service Fabric backup configuration information for the service and * the partitions under this service. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -30161,7 +29806,6 @@ function _disableServiceBackup(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -30351,7 +29995,6 @@ function _getServiceBackupConfigurationInfo(serviceId, options, callback) { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -30360,7 +30003,6 @@ function _getServiceBackupConfigurationInfo(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -30591,7 +30233,6 @@ function _getServiceBackupList(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -30731,7 +30372,6 @@ function _suspendServiceBackup(serviceId, options, callback) { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -30867,7 +30507,6 @@ function _resumeServiceBackup(serviceId, options, callback) { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} enableBackupDescription Specifies the parameters for @@ -31027,7 +30666,6 @@ function _enablePartitionBackup(partitionId, enableBackupDescription, options, c * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -31160,7 +30798,6 @@ function _disablePartitionBackup(partitionId, options, callback) { * Gets the Service Fabric Backup configuration information for the specified * partition. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -31314,7 +30951,6 @@ function _getPartitionBackupConfigurationInfo(partitionId, options, callback) { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -31772,7 +31408,6 @@ function _resumePartitionBackup(partitionId, options, callback) { * In case, the operation times out, specify a greater backup timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -31950,7 +31585,6 @@ function _backupPartition(partitionId, options, callback) { * Returns information about the state of the latest backup along with details * or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -32109,7 +31743,6 @@ function _getPartitionBackupProgress(partitionId, options, callback) { * In case, the operation times out, specify a greater restore timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} restorePartitionDescription Describes the parameters to @@ -32292,7 +31925,6 @@ function _restorePartition(partitionId, restorePartitionDescription, options, ca * Returns information about the state of the latest restore operation along * with details or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -32445,7 +32077,6 @@ function _getPartitionRestoreProgress(partitionId, options, callback) { * (Application, Service or Partition) at the specified backup location * (FileShare or Azure Blob Storage). * - * * @param {object} getBackupByStorageQueryDescription Describes the filters and * backup storage details to be used for enumerating backups. * @@ -34118,13 +33749,11 @@ function _submitPropertyBatch(nameId, propertyBatchDescriptionList, options, cal * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34328,13 +33957,11 @@ function _getClusterEventList(startTimeUtc, endTimeUtc, options, callback) { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34540,13 +34167,11 @@ function _getContainersEventList(startTimeUtc, endTimeUtc, options, callback) { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34754,13 +34379,11 @@ function _getNodeEventList(nodeName, startTimeUtc, endTimeUtc, options, callback * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34952,7 +34575,6 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -34973,13 +34595,11 @@ function _getNodesEventList(startTimeUtc, endTimeUtc, options, callback) { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -35187,13 +34807,11 @@ function _getApplicationEventList(applicationId, startTimeUtc, endTimeUtc, optio * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -35385,7 +35003,6 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -35406,13 +35023,11 @@ function _getApplicationsEventList(startTimeUtc, endTimeUtc, options, callback) * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -35620,13 +35235,11 @@ function _getServiceEventList(serviceId, startTimeUtc, endTimeUtc, options, call * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -35832,13 +35445,11 @@ function _getServicesEventList(startTimeUtc, endTimeUtc, options, callback) { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36046,13 +35657,11 @@ function _getPartitionEventList(partitionId, startTimeUtc, endTimeUtc, options, * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36260,13 +35869,11 @@ function _getPartitionsEventList(startTimeUtc, endTimeUtc, options, callback) { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36480,13 +36087,11 @@ function _getPartitionReplicaEventList(partitionId, replicaId, startTimeUtc, end * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -37076,7 +36681,6 @@ class ServiceFabricClient extends ServiceClient { * users are not expected to take a dependency on the format of the file * contents or its interpretation. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -37124,7 +36728,6 @@ class ServiceFabricClient extends ServiceClient { * users are not expected to take a dependency on the format of the file * contents or its interpretation. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -37187,7 +36790,6 @@ class ServiceFabricClient extends ServiceClient { * filter the collection of nodes and applications returned based on their * aggregated health state. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -37213,7 +36815,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -37240,7 +36841,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -37264,14 +36864,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -37283,7 +36881,6 @@ class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -37322,7 +36919,6 @@ class ServiceFabricClient extends ServiceClient { * filter the collection of nodes and applications returned based on their * aggregated health state. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -37348,7 +36944,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -37375,7 +36970,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -37399,14 +36993,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -37418,7 +37010,6 @@ class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -37482,7 +37073,6 @@ class ServiceFabricClient extends ServiceClient { * Use ClusterHealthPolicies to override the health policies used to evaluate * the health. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -37508,7 +37098,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -37535,7 +37124,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -37559,14 +37147,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -37578,7 +37164,6 @@ class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {object} [options.clusterHealthPolicies] Describes the health * policies used to evaluate the cluster health. * If not present, the health evaluation uses the cluster health policy defined @@ -37590,7 +37175,6 @@ class ServiceFabricClient extends ServiceClient { * an application, the specified application health policy * is used to evaluate the application health. * - * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * Defines a map that contains specific application health policies for * different applications. @@ -37602,12 +37186,10 @@ class ServiceFabricClient extends ServiceClient { * defined in the manifest). * The map is empty by default. * - * * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -37629,7 +37211,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -37647,7 +37228,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -37673,7 +37253,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -37715,7 +37294,6 @@ class ServiceFabricClient extends ServiceClient { * Use ClusterHealthPolicies to override the health policies used to evaluate * the health. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.nodesHealthStateFilter] Allows filtering of the @@ -37741,7 +37319,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.applicationsHealthStateFilter] Allows filtering of * the application health state objects returned in the result of cluster * health @@ -37768,7 +37345,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.eventsHealthStateFilter] 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 @@ -37792,14 +37368,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {boolean} [options.includeSystemApplicationHealthStatistics] * Indicates whether the health statistics should include the fabric:/System * application health statistics. False by default. @@ -37811,7 +37385,6 @@ class ServiceFabricClient extends ServiceClient { * The health statistics must be included in the query result for this * parameter to be applied. * - * * @param {object} [options.clusterHealthPolicies] Describes the health * policies used to evaluate the cluster health. * If not present, the health evaluation uses the cluster health policy defined @@ -37823,7 +37396,6 @@ class ServiceFabricClient extends ServiceClient { * an application, the specified application health policy * is used to evaluate the application health. * - * * @param {array} [options.clusterHealthPolicies.applicationHealthPolicyMap] * Defines a map that contains specific application health policies for * different applications. @@ -37835,12 +37407,10 @@ class ServiceFabricClient extends ServiceClient { * defined in the manifest). * The map is empty by default. * - * * @param {object} [options.clusterHealthPolicies.clusterHealthPolicy] Defines * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthPolicies.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -37862,7 +37432,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicies.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -37880,7 +37449,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthPolicies.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -37906,7 +37474,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -37967,7 +37534,6 @@ class ServiceFabricClient extends ServiceClient { * entities, use the POST URI and specify the cluster health chunk query * description. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -38008,7 +37574,6 @@ class ServiceFabricClient extends ServiceClient { * entities, use the POST URI and specify the cluster health chunk query * description. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -38078,7 +37643,6 @@ class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.clusterHealthChunkQueryDescription] Describes the @@ -38103,7 +37667,6 @@ class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] * Defines a list of filters that specify which nodes to be included in the * returned cluster health chunk. @@ -38115,7 +37678,6 @@ class ServiceFabricClient extends ServiceClient { * Error and another filter to always include a node identified by its * NodeName. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a * list of filters that specify which applications to be included in the @@ -38128,13 +37690,11 @@ class ServiceFabricClient extends ServiceClient { * state Error and another filter to always include applications of a specified * application type. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a * health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -38156,7 +37716,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -38174,7 +37733,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -38200,13 +37758,11 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -38257,7 +37813,6 @@ class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.clusterHealthChunkQueryDescription] Describes the @@ -38282,7 +37837,6 @@ class ServiceFabricClient extends ServiceClient { * only services that are in Error or Warning, and all partitions and replicas * for one of these services. * - * * @param {array} [options.clusterHealthChunkQueryDescription.nodeFilters] * Defines a list of filters that specify which nodes to be included in the * returned cluster health chunk. @@ -38294,7 +37848,6 @@ class ServiceFabricClient extends ServiceClient { * Error and another filter to always include a node identified by its * NodeName. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationFilters] Defines a * list of filters that specify which applications to be included in the @@ -38307,13 +37860,11 @@ class ServiceFabricClient extends ServiceClient { * state Error and another filter to always include applications of a specified * application type. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy] Defines a * health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -38335,7 +37886,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -38353,7 +37903,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -38379,13 +37928,11 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies] * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [options.clusterHealthChunkQueryDescription.applicationHealthPolicies.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -38457,7 +38004,6 @@ class ServiceFabricClient extends ServiceClient { * GetClusterHealth and check that the report appears in the HealthEvents * section. * - * * @param {object} healthInformation 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. @@ -38465,7 +38011,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -38481,7 +38026,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -38500,7 +38044,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -38512,7 +38055,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -38520,7 +38062,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -38533,7 +38074,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -38555,7 +38095,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -38600,7 +38139,6 @@ class ServiceFabricClient extends ServiceClient { * GetClusterHealth and check that the report appears in the HealthEvents * section. * - * * @param {object} healthInformation 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. @@ -38608,7 +38146,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -38624,7 +38161,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -38643,7 +38179,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -38655,7 +38190,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -38663,7 +38197,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -38676,7 +38209,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -38698,7 +38230,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -39055,7 +38586,6 @@ class ServiceFabricClient extends ServiceClient { * types on the cluster, * security configurations, fault and upgrade domain topologies, etc. * - * * @param {string} configurationApiVersion The API version of the Standalone * cluster json configuration. * @@ -39097,7 +38627,6 @@ class ServiceFabricClient extends ServiceClient { * types on the cluster, * security configurations, fault and upgrade domain topologies, etc. * - * * @param {string} configurationApiVersion The API version of the Standalone * cluster json configuration. * @@ -39160,7 +38689,6 @@ class ServiceFabricClient extends ServiceClient { * Get the cluster configuration upgrade status details of a Service Fabric * standalone cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -39198,7 +38726,6 @@ class ServiceFabricClient extends ServiceClient { * Get the cluster configuration upgrade status details of a Service Fabric * standalone cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -39929,8 +39456,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -39973,7 +39499,6 @@ class ServiceFabricClient extends ServiceClient { * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -39995,7 +39520,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -40013,7 +39537,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -40039,7 +39562,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -40072,7 +39594,6 @@ class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -40157,8 +39678,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [startClusterUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -40201,7 +39721,6 @@ class ServiceFabricClient extends ServiceClient { * a health policy used to evaluate the health of the cluster or of a cluster * node. * - * * @param {boolean} * [startClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -40223,7 +39742,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [startClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -40241,7 +39759,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [startClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -40267,7 +39784,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [startClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -40300,7 +39816,6 @@ class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [startClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -40591,8 +40106,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -40635,7 +40149,6 @@ class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -40657,7 +40170,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -40675,7 +40187,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -40701,7 +40212,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -40734,7 +40244,6 @@ class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -40813,8 +40322,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [updateClusterUpgradeDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -40857,7 +40365,6 @@ class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of the cluster or of a * cluster node. * - * * @param {boolean} * [updateClusterUpgradeDescription.clusterHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -40879,7 +40386,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [updateClusterUpgradeDescription.clusterHealthPolicy.maxPercentUnhealthyApplications] * The maximum allowed percentage of unhealthy applications before reporting an @@ -40897,7 +40403,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [updateClusterUpgradeDescription.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific @@ -40923,7 +40428,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {boolean} * [updateClusterUpgradeDescription.enableDeltaHealthEvaluation] When true, * enables delta health evaluation rather than absolute health evaluation after @@ -40956,7 +40460,6 @@ class ServiceFabricClient extends ServiceClient { * Defines the application health policy map used to evaluate the health of an * application or one of its children entities. * - * * @param {array} * [updateClusterUpgradeDescription.applicationHealthPolicyMap.applicationHealthPolicyMap] * The wrapper that contains the map with application health policies used to @@ -41023,7 +40526,6 @@ class ServiceFabricClient extends ServiceClient { * needed to set up an Azure Active Directory secured connection with a Service * Fabric cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -41064,7 +40566,6 @@ class ServiceFabricClient extends ServiceClient { * needed to set up an Azure Active Directory secured connection with a Service * Fabric cluster. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -41376,7 +40877,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41440,7 +40940,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41528,7 +41027,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.clusterHealthPolicy] 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 @@ -41553,7 +41051,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum * allowed percentage of unhealthy applications before reporting an error. For @@ -41571,7 +41068,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific * application types. @@ -41596,7 +41092,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41662,7 +41157,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.clusterHealthPolicy] 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 @@ -41687,7 +41181,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [options.clusterHealthPolicy.maxPercentUnhealthyApplications] The maximum * allowed percentage of unhealthy applications before reporting an error. For @@ -41705,7 +41198,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} [options.clusterHealthPolicy.applicationTypeHealthPolicyMap] * Defines a map with max percentage unhealthy applications for specific * application types. @@ -41730,7 +41222,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41796,7 +41287,6 @@ class ServiceFabricClient extends ServiceClient { * To see whether the report was applied in the health store, run GetNodeHealth * and check that the report appears in the HealthEvents section. * - * * @param {string} nodeName The name of the node. * * @param {object} healthInformation Describes the health information for the @@ -41806,7 +41296,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -41822,7 +41311,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -41841,7 +41329,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -41853,7 +41340,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -41861,7 +41347,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -41874,7 +41359,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -41896,7 +41380,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -41940,7 +41423,6 @@ class ServiceFabricClient extends ServiceClient { * To see whether the report was applied in the health store, run GetNodeHealth * and check that the report appears in the HealthEvents section. * - * * @param {string} nodeName The name of the node. * * @param {object} healthInformation Describes the health information for the @@ -41950,7 +41432,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -41966,7 +41447,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -41985,7 +41465,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -41997,7 +41476,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -42005,7 +41483,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -42018,7 +41495,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -42040,7 +41516,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -42209,8 +41684,7 @@ class ServiceFabricClient extends ServiceClient { * * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are - * following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * @@ -42263,8 +41737,7 @@ class ServiceFabricClient extends ServiceClient { * * @param {string} [deactivationIntentDescription.deactivationIntent] Describes * the intent or reason for deactivating the node. The possible values are - * following. - * . Possible values include: 'Pause', 'Restart', 'RemoveData' + * following. Possible values include: 'Pause', 'Restart', 'RemoveData' * * @param {object} [options] Optional Parameters. * @@ -42683,7 +42156,6 @@ class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationTypeDefinitionKind * value Compose. The value is 2. * - * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -42762,7 +42234,6 @@ class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationTypeDefinitionKind * value Compose. The value is 2. * - * * @param {boolean} [options.excludeApplicationParameters] The flag that * specifies whether application parameters will be excluded from the result. * @@ -43015,7 +42486,6 @@ class ServiceFabricClient extends ServiceClient { * specified by the relativePathInImageStore, or by using the URI of the * external '.sfpkg'. * - * * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The * base type of provision application type description which supports either * image store-based provision or external store-based provision. @@ -43073,7 +42543,6 @@ class ServiceFabricClient extends ServiceClient { * specified by the relativePathInImageStore, or by using the URI of the * external '.sfpkg'. * - * * @param {object} provisionApplicationTypeDescriptionBaseRequiredBodyParam The * base type of provision application type description which supports either * image store-based provision or external store-based provision. @@ -43624,7 +43093,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -43679,7 +43147,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of the service @@ -43757,7 +43224,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -43817,7 +43283,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceTypeName Specifies the name of a Service Fabric * service type. * @@ -43907,7 +43372,6 @@ class ServiceFabricClient extends ServiceClient { * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * 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 @@ -43986,7 +43450,6 @@ class ServiceFabricClient extends ServiceClient { * - Limiting the custom capacity metrics to limit the total consumption of * this metric by the services of this application * - * * @param {number} [applicationDescription.applicationCapacity.minimumNodes] * 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 @@ -44076,7 +43539,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -44133,7 +43595,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -44209,7 +43670,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -44258,7 +43718,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -44338,7 +43797,6 @@ class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationDefinitionKind value * Compose. The value is 2. * - * * @param {string} [options.applicationTypeName] The application type name used * to filter the applications to query for. This value should not contain the * application type version. @@ -44417,7 +43875,6 @@ class ServiceFabricClient extends ServiceClient { * - Compose - Filter that matches input with ApplicationDefinitionKind value * Compose. The value is 2. * - * * @param {string} [options.applicationTypeName] The application type name used * to filter the applications to query for. This value should not contain the * application type version. @@ -44508,7 +43965,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that @@ -44558,7 +44014,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.excludeApplicationParameters] The flag that @@ -44629,7 +44084,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -44655,7 +44109,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -44680,7 +44133,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -44705,14 +44157,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44756,7 +44206,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -44782,7 +44231,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -44807,7 +44255,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -44832,14 +44279,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -44907,7 +44352,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -44933,7 +44377,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -44958,7 +44401,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -44983,21 +44425,18 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -45014,7 +44453,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -45033,7 +44471,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -45048,7 +44485,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -45064,7 +44500,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -45114,7 +44549,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -45140,7 +44574,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedApplicationsHealthStateFilter] Allows * filtering of the deployed applications health state objects returned in the * result of application health query based on their health state. @@ -45165,7 +44598,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.servicesHealthStateFilter] Allows filtering of the * services health state objects returned in the result of services health * query based on their health state. @@ -45190,21 +44622,18 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -45221,7 +44650,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -45240,7 +44668,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -45255,7 +44682,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -45271,7 +44697,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -45341,7 +44766,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -45350,7 +44774,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -45358,7 +44781,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -45374,7 +44796,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -45393,7 +44814,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -45405,7 +44825,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -45413,7 +44832,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -45426,7 +44844,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -45448,7 +44865,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -45492,7 +44908,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -45501,7 +44916,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -45509,7 +44923,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -45525,7 +44938,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -45544,7 +44956,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -45556,7 +44967,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -45564,7 +44974,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -45577,7 +44986,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -45599,7 +45007,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -45663,7 +45070,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeDescription Parameters for an application * upgrade. * @@ -45710,8 +45116,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -45754,7 +45159,6 @@ class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -45772,7 +45176,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -45791,7 +45194,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -45806,7 +45208,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -45822,7 +45223,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -45872,7 +45272,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeDescription Parameters for an application * upgrade. * @@ -45919,8 +45318,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -45963,7 +45361,6 @@ class ServiceFabricClient extends ServiceClient { * Defines a health policy used to evaluate the health of an application or one * of its children entities. * - * * @param {boolean} * [applicationUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -45981,7 +45378,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -46000,7 +45396,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -46015,7 +45410,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -46031,7 +45425,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -46102,7 +45495,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -46147,7 +45539,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -46218,7 +45609,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * @@ -46234,7 +45624,6 @@ class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -46252,7 +45641,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -46271,7 +45659,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -46286,7 +45673,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -46302,7 +45688,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -46340,8 +45725,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -46427,7 +45811,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} applicationUpgradeUpdateDescription Parameters for updating * an existing application upgrade. * @@ -46443,7 +45826,6 @@ class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -46461,7 +45843,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -46480,7 +45861,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -46495,7 +45875,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -46511,7 +45890,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [applicationUpgradeUpdateDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -46549,8 +45927,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [applicationUpgradeUpdateDescription.updateDescription.healthCheckWaitDurationInMilliseconds] @@ -46656,7 +46033,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -46709,7 +46085,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} resumeApplicationUpgradeDescription Describes the parameters * for resuming an application upgrade. * @@ -46785,7 +46160,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -46834,7 +46208,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -46897,7 +46270,6 @@ class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. @@ -46915,7 +46287,6 @@ class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {string} [options.continuationToken] 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 @@ -46966,7 +46337,6 @@ class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {object} [options] Optional Parameters. @@ -46984,7 +46354,6 @@ class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {string} [options.continuationToken] 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 @@ -47059,7 +46428,6 @@ class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -47070,7 +46438,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -47086,7 +46453,6 @@ class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -47122,7 +46488,6 @@ class ServiceFabricClient extends ServiceClient { * provided node name does not point to any active Service Fabric nodes on the * cluster. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -47133,7 +46498,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -47149,7 +46513,6 @@ class ServiceFabricClient extends ServiceClient { * system service before the results are merged. * As a result, the query is more expensive and may take a longer time. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -47216,7 +46579,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -47242,7 +46604,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -47268,14 +46629,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47324,7 +46683,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -47350,7 +46708,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -47376,14 +46733,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47450,7 +46805,6 @@ class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the deployed application. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -47461,7 +46815,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -47487,7 +46840,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -47513,14 +46865,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -47537,7 +46887,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -47556,7 +46905,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -47571,7 +46919,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -47587,7 +46934,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -47598,7 +46944,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47642,7 +46987,6 @@ class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the deployed application. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -47653,7 +46997,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -47679,7 +47022,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.deployedServicePackagesHealthStateFilter] Allows * filtering of the deployed service package health state objects returned in * the result of deployed application health query based on their health state. @@ -47705,14 +47047,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -47729,7 +47069,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -47748,7 +47087,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -47763,7 +47101,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -47779,7 +47116,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -47790,7 +47126,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -47859,7 +47194,6 @@ class ServiceFabricClient extends ServiceClient { * application health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -47870,7 +47204,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -47878,7 +47211,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -47894,7 +47226,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -47913,7 +47244,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -47925,7 +47255,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -47933,7 +47262,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -47946,7 +47274,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -47968,7 +47295,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -48014,7 +47340,6 @@ class ServiceFabricClient extends ServiceClient { * application health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -48025,7 +47350,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -48033,7 +47357,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -48049,7 +47372,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -48068,7 +47390,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -48080,7 +47401,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -48088,7 +47408,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -48101,7 +47420,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -48123,7 +47441,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -48291,7 +47608,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -48348,7 +47664,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceTypeName] The service type name used to @@ -48427,7 +47742,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -48436,7 +47750,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -48482,7 +47795,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -48491,7 +47803,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -48559,7 +47870,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -48605,7 +47915,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -48675,7 +47984,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceDescription The information necessary to create a * service. * @@ -48779,7 +48087,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceDescription The information necessary to create a * service. * @@ -48904,7 +48211,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * @@ -48976,7 +48282,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} serviceFromTemplateDescription Describes the service that * needs to be created from the template defined in the application manifest. * @@ -49070,7 +48375,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -49125,7 +48429,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.forceRemove] Remove a Service Fabric application @@ -49205,7 +48508,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -49243,7 +48545,6 @@ class ServiceFabricClient extends ServiceClient { * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value * is 1024. * - * * @param {string} [serviceUpdateDescription.placementConstraints] The * placement constraints as a string. Placement constraints are boolean * expressions on node properties and allow for restricting a service to @@ -49321,7 +48622,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} serviceUpdateDescription The information necessary to update * a service. * @@ -49359,7 +48659,6 @@ class ServiceFabricClient extends ServiceClient { * - ScalingPolicy - Indicates the ScalingPolicies property is set. The value * is 1024. * - * * @param {string} [serviceUpdateDescription.placementConstraints] The * placement constraints as a string. Placement constraints are boolean * expressions on node properties and allow for restricting a service to @@ -49450,7 +48749,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -49495,7 +48793,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -49559,7 +48856,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -49568,7 +48864,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -49594,7 +48889,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -49619,14 +48913,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -49666,7 +48958,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -49675,7 +48966,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -49701,7 +48991,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -49726,14 +49015,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -49801,7 +49088,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -49810,7 +49096,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -49836,7 +49121,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -49861,14 +49145,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -49885,7 +49167,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -49904,7 +49185,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -49919,7 +49199,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -49935,7 +49214,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -49946,7 +49224,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -49992,7 +49269,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a service that does not exist in the health store, this * request returns an error. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -50001,7 +49277,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.eventsHealthStateFilter] Allows filtering the @@ -50027,7 +49302,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.partitionsHealthStateFilter] Allows filtering of * the partitions health state objects returned in the result of service health * query based on their health state. @@ -50052,14 +49326,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -50076,7 +49348,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -50095,7 +49366,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -50110,7 +49380,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -50126,7 +49395,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -50137,7 +49405,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -50204,7 +49471,6 @@ class ServiceFabricClient extends ServiceClient { * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -50213,7 +49479,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -50221,7 +49486,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -50237,7 +49501,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -50256,7 +49519,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -50268,7 +49530,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -50276,7 +49537,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -50289,7 +49549,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -50311,7 +49570,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -50356,7 +49614,6 @@ class ServiceFabricClient extends ServiceClient { * GetServiceHealth and check that the report appears in the HealthEvents * section. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -50365,7 +49622,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} healthInformation 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. @@ -50373,7 +49629,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -50389,7 +49644,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -50408,7 +49662,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -50420,7 +49673,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -50428,7 +49680,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -50441,7 +49692,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -50463,7 +49713,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -50527,7 +49776,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] Key type for the partition. This @@ -50543,7 +49791,6 @@ class ServiceFabricClient extends ServiceClient { * the partition. This is valid for the partitions with partitioning scheme as * Named. The value is 3. * - * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. * @@ -50593,7 +49840,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.partitionKeyType] Key type for the partition. This @@ -50609,7 +49855,6 @@ class ServiceFabricClient extends ServiceClient { * the partition. This is valid for the partitions with partitioning scheme as * Named. The value is 3. * - * * @param {string} [options.partitionKeyValue] Partition key. This is required * if the partition scheme for the service is Int64Range or Named. * @@ -50683,7 +49928,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -50737,7 +49981,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -51008,7 +50251,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -51036,7 +50278,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -51060,14 +50301,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51107,7 +50346,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -51135,7 +50373,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -51159,14 +50396,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {boolean} [options.excludeHealthStatistics] 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. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51235,7 +50470,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -51263,7 +50497,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -51287,14 +50520,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -51311,7 +50542,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -51330,7 +50560,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -51345,7 +50574,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -51361,7 +50589,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -51372,7 +50599,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51419,7 +50645,6 @@ class ServiceFabricClient extends ServiceClient { * If you specify a partition that does not exist in the health store, this * request returns an error. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -51447,7 +50672,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.replicasHealthStateFilter] Allows filtering the * collection of ReplicaHealthState objects on the partition. The value can be * obtained from members or bitwise operations on members of HealthStateFilter. @@ -51471,14 +50695,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -51495,7 +50717,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -51514,7 +50735,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -51529,7 +50749,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -51545,7 +50764,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -51556,7 +50774,6 @@ class ServiceFabricClient extends ServiceClient { * The statistics show the number of children entities in health state Ok, * Warning, and Error. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51623,7 +50840,6 @@ class ServiceFabricClient extends ServiceClient { * GetPartitionHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} healthInformation Describes the health information for the @@ -51633,7 +50849,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -51649,7 +50864,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -51668,7 +50882,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -51680,7 +50893,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -51688,7 +50900,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -51701,7 +50912,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -51723,7 +50933,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51768,7 +50977,6 @@ class ServiceFabricClient extends ServiceClient { * GetPartitionHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} healthInformation Describes the health information for the @@ -51778,7 +50986,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -51794,7 +51001,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -51813,7 +51019,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -51825,7 +51030,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -51833,7 +51037,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -51846,7 +51049,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -51868,7 +51070,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -51927,7 +51128,6 @@ class ServiceFabricClient extends ServiceClient { * Each report includes the load metric name, value, and last reported time in * UTC. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -51969,7 +51169,6 @@ class ServiceFabricClient extends ServiceClient { * Each report includes the load metric name, value, and last reported time in * UTC. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -52245,7 +51444,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -52294,7 +51492,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -52570,7 +51767,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -52585,12 +51781,10 @@ class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -52602,17 +51796,14 @@ class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -52627,7 +51818,6 @@ class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -52640,18 +51830,15 @@ class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -52748,7 +51935,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -52763,12 +51949,10 @@ class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -52780,17 +51964,14 @@ class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -52805,7 +51986,6 @@ class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -52818,18 +51998,15 @@ class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -52934,7 +52111,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskCancelDescription Describes the repair task to be * cancelled. * @@ -52982,7 +52158,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskCancelDescription Describes the repair task to be * cancelled. * @@ -53052,7 +52227,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskDeleteDescription Describes the repair task to be * deleted. * @@ -53095,7 +52269,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskDeleteDescription Describes the repair task to be * deleted. * @@ -53159,7 +52332,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.taskIdFilter] The repair task ID prefix to be @@ -53175,7 +52347,6 @@ class ServiceFabricClient extends ServiceClient { * - 32 - Restoring * - 64 - Completed * - * * @param {string} [options.executorFilter] The name of the repair executor * whose claimed tasks should be included in the list. * @@ -53208,7 +52379,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.taskIdFilter] The repair task ID prefix to be @@ -53224,7 +52394,6 @@ class ServiceFabricClient extends ServiceClient { * - 32 - Restoring * - 64 - Completed * - * * @param {string} [options.executorFilter] The name of the repair executor * whose claimed tasks should be included in the list. * @@ -53278,7 +52447,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskApproveDescription Describes the repair task to be * approved. * @@ -53321,7 +52489,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskApproveDescription Describes the repair task to be * approved. * @@ -53386,7 +52553,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair * task healthy policy to be updated. * @@ -53441,7 +52607,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTaskUpdateHealthPolicyDescription Describes the repair * task healthy policy to be updated. * @@ -53518,7 +52683,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -53533,12 +52697,10 @@ class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -53550,17 +52712,14 @@ class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -53575,7 +52734,6 @@ class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -53588,18 +52746,15 @@ class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -53682,7 +52837,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {object} repairTask Describes the repair task to be created or * updated. * @@ -53697,12 +52851,10 @@ class ServiceFabricClient extends ServiceClient { * update will only succeed if the actual current version of the repair task * matches this value. * - * * @param {string} [repairTask.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. * - * * @param {string} repairTask.state The workflow state of the repair task. * Valid initial states are Created, Claimed, and Preparing. Possible values * include: 'Invalid', 'Created', 'Claimed', 'Preparing', 'Approved', @@ -53714,17 +52866,14 @@ class ServiceFabricClient extends ServiceClient { * - 2 - Abort of the repair has been requested * - 4 - Approval of the repair was forced via client request * - * * @param {string} repairTask.action The requested repair action. Must be * specified when the repair task is created, and is immutable once set. * - * * @param {object} [repairTask.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. * - * * @param {string} repairTask.target.kind Polymorphic Discriminator * * @param {string} [repairTask.executor] The name of the repair executor. Must @@ -53739,7 +52888,6 @@ class ServiceFabricClient extends ServiceClient { * Impact must be specified by the repair executor when transitioning to the * Preparing state, and is immutable once set. * - * * @param {string} repairTask.impact.kind Polymorphic Discriminator * * @param {string} [repairTask.resultStatus] A value describing the overall @@ -53752,18 +52900,15 @@ class ServiceFabricClient extends ServiceClient { * May be specified in the Restoring and later states, and is immutable once * set. * - * * @param {string} [repairTask.resultDetails] 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. * - * * @param {object} [repairTask.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. * - * * @param {date} [repairTask.history.createdUtcTimestamp] The time when the * repair task entered the Created state. * @@ -54090,7 +53235,6 @@ class ServiceFabricClient extends ServiceClient { * Use EventsHealthStateFilter to filter the collection of health events * reported on the replica based on the health state. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54120,7 +53264,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -54157,7 +53300,6 @@ class ServiceFabricClient extends ServiceClient { * Use EventsHealthStateFilter to filter the collection of health events * reported on the replica based on the health state. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54187,7 +53329,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -54251,7 +53392,6 @@ class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the replica. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54281,14 +53421,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -54305,7 +53443,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -54324,7 +53461,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -54339,7 +53475,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -54355,7 +53490,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -54401,7 +53535,6 @@ class ServiceFabricClient extends ServiceClient { * the ApplicationHealthPolicy. The rest of the fields are ignored while * evaluating the health of the replica. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54431,14 +53564,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -54455,7 +53586,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -54474,7 +53604,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -54489,7 +53618,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -54505,7 +53633,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -54576,7 +53703,6 @@ class ServiceFabricClient extends ServiceClient { * GetReplicaHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54592,7 +53718,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -54608,7 +53733,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -54627,7 +53751,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -54639,7 +53762,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -54647,7 +53769,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -54660,7 +53781,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -54682,7 +53802,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -54727,7 +53846,6 @@ class ServiceFabricClient extends ServiceClient { * GetReplicaHealth and check that the report appears in the HealthEvents * section. * - * * @param {uuid} partitionId The identity of the partition. * * @param {string} replicaId The identifier of the replica. @@ -54743,7 +53861,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -54759,7 +53876,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -54778,7 +53894,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -54790,7 +53905,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -54798,7 +53912,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -54811,7 +53924,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -54833,7 +53945,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -54903,7 +54014,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -54959,7 +54069,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.partitionId] The identity of the partition. @@ -55491,7 +54600,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -55539,7 +54647,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -55610,7 +54717,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -55662,7 +54768,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -55735,7 +54840,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -55763,7 +54867,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -55811,7 +54914,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -55839,7 +54941,6 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -55905,7 +55006,6 @@ class ServiceFabricClient extends ServiceClient { * the fields are ignored while evaluating the health of the deployed service * package. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -55916,7 +55016,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -55944,14 +55043,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -55968,7 +55065,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -55987,7 +55083,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -56002,7 +55097,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -56018,7 +55112,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -56065,7 +55158,6 @@ class ServiceFabricClient extends ServiceClient { * the fields are ignored while evaluating the health of the deployed service * package. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -56076,7 +55168,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} [options] Optional Parameters. @@ -56104,14 +55195,12 @@ class ServiceFabricClient extends ServiceClient { * - All - Filter that matches input with any HealthState value. The value is * 65535. * - * * @param {object} [options.applicationHealthPolicy] 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. * - * * @param {boolean} [options.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. * @@ -56128,7 +55217,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy] The health * policy used by default to evaluate the health of a service type. @@ -56147,7 +55235,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -56162,7 +55249,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [options.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -56178,7 +55264,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} [options.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is * empty by default. @@ -56251,7 +55336,6 @@ class ServiceFabricClient extends ServiceClient { * service package health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -56262,7 +55346,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -56272,7 +55355,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -56288,7 +55370,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -56307,7 +55388,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -56319,7 +55399,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -56327,7 +55406,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -56340,7 +55418,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -56362,7 +55439,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56408,7 +55484,6 @@ class ServiceFabricClient extends ServiceClient { * service package health and check that the report appears in the HealthEvents * section. * - * * @param {string} nodeName The name of the node. * * @param {string} applicationId The identity of the application. This is @@ -56419,7 +55494,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} servicePackageName The name of the service package. * * @param {object} healthInformation Describes the health information for the @@ -56429,7 +55503,6 @@ class ServiceFabricClient extends ServiceClient { * @param {string} healthInformation.sourceId The source name which identifies * the client/watchdog/system component which generated the health information. * - * * @param {string} healthInformation.property 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 @@ -56445,7 +55518,6 @@ class ServiceFabricClient extends ServiceClient { * Together with the SourceId, the property uniquely identifies the health * information. * - * * @param {string} healthInformation.healthState The health state of a Service * Fabric entity such as Cluster, Node, Application, Service, Partition, * Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', @@ -56464,7 +55536,6 @@ class ServiceFabricClient extends ServiceClient { * * If not specified, time to live defaults to infinite value. * - * * @param {string} [healthInformation.description] The description of the * health information. It represents free text used to add human readable * information about the report. @@ -56476,7 +55547,6 @@ class ServiceFabricClient extends ServiceClient { * Note that when truncated, the description has less than 4096 characters from * the original string. * - * * @param {string} [healthInformation.sequenceNumber] The sequence number for * this health report as a numeric string. * The report sequence number is used by the health store to detect stale @@ -56484,7 +55554,6 @@ class ServiceFabricClient extends ServiceClient { * If not specified, a sequence number is auto-generated by the health client * when a report is added. * - * * @param {boolean} [healthInformation.removeWhenExpired] 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 @@ -56497,7 +55566,6 @@ class ServiceFabricClient extends ServiceClient { * entity is evaluated at error when the health report expires. * This flags the entity as being in Error health state. * - * * @param {object} [options] Optional Parameters. * * @param {boolean} [options.immediate] A flag which indicates whether the @@ -56519,7 +55587,6 @@ class ServiceFabricClient extends ServiceClient { * processing. * By default, reports are not sent immediately. * - * * @param {number} [options.timeout] The server timeout for performing the * operation in seconds. This timeout specifies the time duration that the * client is willing to wait for the requested operation to complete. The @@ -56580,7 +55647,6 @@ class ServiceFabricClient extends ServiceClient { * and upgrade, thus significantly reducing the total time required for the * deployment or upgrade. * - * * @param {string} nodeName The name of the node. * * @param {object} deployServicePackageToNodeDescription Describes information @@ -56642,7 +55708,6 @@ class ServiceFabricClient extends ServiceClient { * and upgrade, thus significantly reducing the total time required for the * deployment or upgrade. * - * * @param {string} nodeName The name of the node. * * @param {object} deployServicePackageToNodeDescription Describes information @@ -56730,7 +55795,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -56784,7 +55848,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.serviceManifestName] The name of a service manifest @@ -56861,7 +55924,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * @@ -56876,7 +55938,6 @@ class ServiceFabricClient extends ServiceClient { * 'SharedProcess'), then value of ServicePackageActivationId * is always an empty string. * - * * @param {string} restartDeployedCodePackageDescription.codePackageName The * name of the code package defined in the service manifest. * @@ -56892,7 +55953,6 @@ class ServiceFabricClient extends ServiceClient { * 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. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -56941,7 +56001,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} restartDeployedCodePackageDescription Describes the deployed * code package on Service Fabric node to restart. * @@ -56956,7 +56015,6 @@ class ServiceFabricClient extends ServiceClient { * 'SharedProcess'), then value of ServicePackageActivationId * is always an empty string. * - * * @param {string} restartDeployedCodePackageDescription.codePackageName The * name of the code package defined in the service manifest. * @@ -56972,7 +56030,6 @@ class ServiceFabricClient extends ServiceClient { * 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. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -57041,7 +56098,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -57102,7 +56158,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -57185,7 +56240,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -57258,7 +56312,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} serviceManifestName The name of a service manifest * registered as part of an application type in a Service Fabric cluster. * @@ -57982,8 +57035,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -58027,7 +57079,6 @@ class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -58045,7 +57096,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -58064,7 +57114,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -58079,7 +57128,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -58095,7 +57143,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -58196,8 +57243,7 @@ class ServiceFabricClient extends ServiceClient { * 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' + * mode. Possible values include: 'Invalid', 'Rollback', 'Manual' * * @param {string} * [composeDeploymentUpgradeDescription.monitoringPolicy.healthCheckWaitDurationInMilliseconds] @@ -58241,7 +57287,6 @@ class ServiceFabricClient extends ServiceClient { * health policy used to evaluate the health of an application or one of its * children entities. * - * * @param {boolean} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.considerWarningAsError] * Indicates whether warnings are treated with the same severity as errors. @@ -58259,7 +57304,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of nodes. * Default percentage is zero. * - * * @param {object} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy] * The health policy used by default to evaluate the health of a service type. @@ -58278,7 +57322,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * partitions. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition] * The maximum allowed percentage of unhealthy replicas per partition. Allowed @@ -58293,7 +57336,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * replicas. Default percentage is zero. * - * * @param {number} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.defaultServiceTypeHealthPolicy.maxPercentUnhealthyServices] * The maximum maximum allowed percentage of unhealthy services. Allowed values @@ -58309,7 +57351,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * services. Default percentage is zero. * - * * @param {array} * [composeDeploymentUpgradeDescription.applicationHealthPolicy.serviceTypeHealthPolicyMap] * The map with service type health policy per service type name. The map is @@ -58373,7 +57414,6 @@ class ServiceFabricClient extends ServiceClient { * Chaos parameters used for running Chaos and the status of the Chaos * Schedule. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -58411,7 +57451,6 @@ class ServiceFabricClient extends ServiceClient { * Chaos parameters used for running Chaos and the status of the Chaos * Schedule. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -58475,7 +57514,6 @@ class ServiceFabricClient extends ServiceClient { * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) * for more details. * - * * @param {object} chaosParameters Describes all the parameters to configure a * Chaos run. * @@ -58483,7 +57521,6 @@ class ServiceFabricClient extends ServiceClient { * for which Chaos will run before automatically stopping. The maximum allowed * value is 4,294,967,295 (System.UInt32.MaxValue). * - * * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] * 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 @@ -58492,7 +57529,6 @@ class ServiceFabricClient extends ServiceClient { * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed * event. * - * * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is * the maximum number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -58502,11 +57538,9 @@ class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value of 2 or 3 and to exercise * caution while moving up. * - * * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or * disables the move primary and move secondary faults. * - * * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time * (in seconds) between consecutive faults within a single iteration. * The larger the value, the lower the overlapping between faults and the @@ -58514,19 +57548,16 @@ class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value between 1 and 5 and exercise * caution while moving up. * - * * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * - * * @param {object} [chaosParameters.clusterHealthPolicy] 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. * - * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -58548,7 +57579,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The * maximum allowed percentage of unhealthy applications before reporting an @@ -58566,7 +57596,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines * a map with max percentage unhealthy applications for specific application @@ -58592,7 +57621,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} [chaosParameters.context] Describes a map, which is a * collection of (string, string) type key-value pairs. The map can be used to * record information about @@ -58601,11 +57629,9 @@ class ServiceFabricClient extends ServiceClient { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @param {object} [chaosParameters.context.map] Describes a map that contains * a collection of ChaosContextMapItem's. * - * * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities * to target for Chaos faults. * This filter can be used to target Chaos faults only to certain node types or @@ -58614,7 +57640,6 @@ class ServiceFabricClient extends ServiceClient { * If ChaosTargetFilter is used, Chaos faults only the entities that meet the * ChaosTargetFilter specification. * - * * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A * list of node types to include in Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -58630,7 +57655,6 @@ class ServiceFabricClient extends ServiceClient { * number, a config upgrade is required for * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] * A list of application URI's to include in Chaos faults. * All replicas belonging to services of these applications are amenable to @@ -58648,7 +57672,6 @@ class ServiceFabricClient extends ServiceClient { * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -58690,7 +57713,6 @@ class ServiceFabricClient extends ServiceClient { * clusters](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-controlled-chaos) * for more details. * - * * @param {object} chaosParameters Describes all the parameters to configure a * Chaos run. * @@ -58698,7 +57720,6 @@ class ServiceFabricClient extends ServiceClient { * for which Chaos will run before automatically stopping. The maximum allowed * value is 4,294,967,295 (System.UInt32.MaxValue). * - * * @param {number} [chaosParameters.maxClusterStabilizationTimeoutInSeconds] * 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 @@ -58707,7 +57728,6 @@ class ServiceFabricClient extends ServiceClient { * MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed * event. * - * * @param {number} [chaosParameters.maxConcurrentFaults] MaxConcurrentFaults is * the maximum number of concurrent faults induced per iteration. * Chaos executes in iterations and two consecutive iterations are separated by @@ -58717,11 +57737,9 @@ class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value of 2 or 3 and to exercise * caution while moving up. * - * * @param {boolean} [chaosParameters.enableMoveReplicaFaults] Enables or * disables the move primary and move secondary faults. * - * * @param {number} [chaosParameters.waitTimeBetweenFaultsInSeconds] Wait time * (in seconds) between consecutive faults within a single iteration. * The larger the value, the lower the overlapping between faults and the @@ -58729,19 +57747,16 @@ class ServiceFabricClient extends ServiceClient { * The recommendation is to start with a value between 1 and 5 and exercise * caution while moving up. * - * * @param {number} [chaosParameters.waitTimeBetweenIterationsInSeconds] * Time-separation (in seconds) between two consecutive iterations of Chaos. * The larger the value, the lower the fault injection rate. * - * * @param {object} [chaosParameters.clusterHealthPolicy] 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. * - * * @param {boolean} * [chaosParameters.clusterHealthPolicy.considerWarningAsError] Indicates * whether warnings are treated with the same severity as errors. @@ -58763,7 +57778,6 @@ class ServiceFabricClient extends ServiceClient { * In large clusters, some nodes will always be down or out for repairs, so * this percentage should be configured to tolerate that. * - * * @param {number} * [chaosParameters.clusterHealthPolicy.maxPercentUnhealthyApplications] The * maximum allowed percentage of unhealthy applications before reporting an @@ -58781,7 +57795,6 @@ class ServiceFabricClient extends ServiceClient { * The computation rounds up to tolerate one failure on small numbers of * applications. Default percentage is zero. * - * * @param {array} * [chaosParameters.clusterHealthPolicy.applicationTypeHealthPolicyMap] Defines * a map with max percentage unhealthy applications for specific application @@ -58807,7 +57820,6 @@ class ServiceFabricClient extends ServiceClient { * enables application type health evaluation using the configuration entry for * HealthManager/EnableApplicationTypeHealthEvaluation. * - * * @param {object} [chaosParameters.context] Describes a map, which is a * collection of (string, string) type key-value pairs. The map can be used to * record information about @@ -58816,11 +57828,9 @@ class ServiceFabricClient extends ServiceClient { * This map is set by the starter of the Chaos run to optionally store the * context about the specific run. * - * * @param {object} [chaosParameters.context.map] Describes a map that contains * a collection of ChaosContextMapItem's. * - * * @param {object} [chaosParameters.chaosTargetFilter] List of cluster entities * to target for Chaos faults. * This filter can be used to target Chaos faults only to certain node types or @@ -58829,7 +57839,6 @@ class ServiceFabricClient extends ServiceClient { * If ChaosTargetFilter is used, Chaos faults only the entities that meet the * ChaosTargetFilter specification. * - * * @param {array} [chaosParameters.chaosTargetFilter.nodeTypeInclusionList] A * list of node types to include in Chaos faults. * All types of faults (restart node, restart code package, remove replica, @@ -58845,7 +57854,6 @@ class ServiceFabricClient extends ServiceClient { * number, a config upgrade is required for * MaxNumberOfNodeTypesInChaosEntityFilter configuration. * - * * @param {array} [chaosParameters.chaosTargetFilter.applicationInclusionList] * A list of application URI's to include in Chaos faults. * All replicas belonging to services of these applications are amenable to @@ -58863,7 +57871,6 @@ class ServiceFabricClient extends ServiceClient { * this number, a config upgrade is required for * MaxNumberOfApplicationsInChaosEntityFilter configuration. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -58926,7 +57933,6 @@ class ServiceFabricClient extends ServiceClient { * to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in * order to resume scheduling. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -58968,7 +57974,6 @@ class ServiceFabricClient extends ServiceClient { * to Chaos Schedule new runs of Chaos. A new Chaos Schedule must be set in * order to resume scheduling. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -59034,7 +58039,6 @@ class ServiceFabricClient extends ServiceClient { * to get the next segment you make a call to this API with the continuation * token. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -59107,7 +58111,6 @@ class ServiceFabricClient extends ServiceClient { * to get the next segment you make a call to this API with the continuation * token. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -59194,7 +58197,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the version of the Chaos Schedule in use and the Chaos Schedule that * defines when and how to run Chaos. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -59226,7 +58228,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the version of the Chaos Schedule in use and the Chaos Schedule that * defines when and how to run Chaos. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -59289,7 +58290,6 @@ class ServiceFabricClient extends ServiceClient { * incremented up by one and wraps back to 0 after 2,147,483,647. * If Chaos is running when this call is made, the call will fail. * - * * @param {object} chaosSchedule Describes the schedule used by Chaos. * * @param {number} [chaosSchedule.version] The version number of the Schedule. @@ -59299,19 +58299,15 @@ class ServiceFabricClient extends ServiceClient { * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos * will start using this schedule. * - * * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos * will continue to use this schedule until. * - * * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * - * * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule * Jobs that will be automated by the schedule. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -59351,7 +58347,6 @@ class ServiceFabricClient extends ServiceClient { * incremented up by one and wraps back to 0 after 2,147,483,647. * If Chaos is running when this call is made, the call will fail. * - * * @param {object} chaosSchedule Describes the schedule used by Chaos. * * @param {number} [chaosSchedule.version] The version number of the Schedule. @@ -59361,19 +58356,15 @@ class ServiceFabricClient extends ServiceClient { * @param {date} [chaosSchedule.schedule.startDate] The date and time Chaos * will start using this schedule. * - * * @param {date} [chaosSchedule.schedule.expiryDate] The date and time Chaos * will continue to use this schedule until. * - * * @param {array} [chaosSchedule.schedule.chaosParametersDictionary] A mapping * of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. * - * * @param {array} [chaosSchedule.schedule.jobs] A list of all Chaos Schedule * Jobs that will be automated by the schedule. * - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -59435,7 +58426,6 @@ class ServiceFabricClient extends ServiceClient { * upload it last, to let the image store service know that the folder is * complete. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -59484,7 +58474,6 @@ class ServiceFabricClient extends ServiceClient { * upload it last, to let the image store service know that the folder is * complete. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -59969,7 +58958,6 @@ class ServiceFabricClient extends ServiceClient { * The DELETE request will cause the existing upload session to expire and * remove any previously uploaded file chunks. * - * * @param {uuid} sessionId 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. @@ -60010,7 +58998,6 @@ class ServiceFabricClient extends ServiceClient { * The DELETE request will cause the existing upload session to expire and * remove any previously uploaded file chunks. * - * * @param {uuid} sessionId 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. @@ -60074,7 +59061,6 @@ class ServiceFabricClient extends ServiceClient { * upload session until the expiration time, which is 30 minutes after the last * chunk received. * - * * @param {uuid} sessionId 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. @@ -60117,7 +59103,6 @@ class ServiceFabricClient extends ServiceClient { * upload session until the expiration time, which is 30 minutes after the last * chunk received. * - * * @param {uuid} sessionId 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. @@ -60179,7 +59164,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the image store upload session identified by the given ID. User can * query the upload session at any time during uploading. * - * * @param {uuid} sessionId 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. @@ -60220,7 +59204,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the image store upload session identified by the given ID. User can * query the upload session at any time during uploading. * - * * @param {uuid} sessionId 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. @@ -60284,7 +59267,6 @@ class ServiceFabricClient extends ServiceClient { * relative path. User can query the upload session at any time during * uploading. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -60325,7 +59307,6 @@ class ServiceFabricClient extends ServiceClient { * relative path. User can query the upload session at any time during * uploading. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -60396,7 +59377,6 @@ class ServiceFabricClient extends ServiceClient { * image store relative path already exists, it will be overwritten when the * upload session commits. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -60456,7 +59436,6 @@ class ServiceFabricClient extends ServiceClient { * image store relative path already exists, it will be overwritten when the * upload session commits. * - * * @param {string} contentPath Relative path to file or folder in the image * store from its root. * @@ -60539,7 +59518,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -60595,7 +59573,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -60672,7 +59649,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -60728,7 +59704,6 @@ class ServiceFabricClient extends ServiceClient { * This API supports the Service Fabric platform; it is not meant to be used * directly from your code. * - * * @param {string} command The text of the command to be invoked. The content * of the command is infrastructure-specific. * @@ -60813,7 +59788,6 @@ class ServiceFabricClient extends ServiceClient { * Call the GetDataLossProgress API with the same OperationId to return * information on the operation started with this API. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -60822,7 +59796,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -60887,7 +59860,6 @@ class ServiceFabricClient extends ServiceClient { * Call the GetDataLossProgress API with the same OperationId to return * information on the operation started with this API. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -60896,7 +59868,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -60964,7 +59935,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a data loss operation started with StartDataLoss, using * the OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -60973,7 +59943,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61016,7 +59985,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a data loss operation started with StartDataLoss, using * the OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61025,7 +59993,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61097,7 +60064,6 @@ class ServiceFabricClient extends ServiceClient { * services. Do not use this API on stateless services or stateful in-memory * only services. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61106,7 +60072,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61162,7 +60127,6 @@ class ServiceFabricClient extends ServiceClient { * services. Do not use this API on stateless services or stateful in-memory * only services. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61171,7 +60135,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61242,7 +60205,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a quorum loss operation started with StartQuorumLoss, * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61251,7 +60213,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61294,7 +60255,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a quorum loss operation started with StartQuorumLoss, * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61303,7 +60263,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61374,7 +60333,6 @@ class ServiceFabricClient extends ServiceClient { * Call the GetPartitionRestartProgress API using the same OperationId to get * the progress. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61383,7 +60341,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61435,7 +60392,6 @@ class ServiceFabricClient extends ServiceClient { * Call the GetPartitionRestartProgress API using the same OperationId to get * the progress. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61444,7 +60400,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61512,7 +60467,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a PartitionRestart started with StartPartitionRestart * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61521,7 +60475,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61564,7 +60517,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of a PartitionRestart started with StartPartitionRestart * using the provided OperationId. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -61573,7 +60525,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {uuid} partitionId The identity of the partition. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61644,7 +60595,6 @@ class ServiceFabricClient extends ServiceClient { * Call GetNodeTransitionProgress with the same OperationId to get the progress * of the operation. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61704,7 +60654,6 @@ class ServiceFabricClient extends ServiceClient { * Call GetNodeTransitionProgress with the same OperationId to get the progress * of the operation. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61780,7 +60729,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of an operation started with StartNodeTransition using the * provided OperationId. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61823,7 +60771,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the progress of an operation started with StartNodeTransition using the * provided OperationId. * - * * @param {string} nodeName The name of the node. * * @param {uuid} operationId A GUID that identifies a call of this API. This @@ -61896,7 +60843,6 @@ class ServiceFabricClient extends ServiceClient { * 4 - select PartitionRestart. * 8 - select NodeTransition. * - * * @param {number} stateFilter Used to filter on OperationState's for * user-induced operations. * 65535 - select All @@ -61907,7 +60853,6 @@ class ServiceFabricClient extends ServiceClient { * 32 - select Cancelled * 64 - select ForceCancelled * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -61952,7 +60897,6 @@ class ServiceFabricClient extends ServiceClient { * 4 - select PartitionRestart. * 8 - select NodeTransition. * - * * @param {number} stateFilter Used to filter on OperationState's for * user-induced operations. * 65535 - select All @@ -61963,7 +60907,6 @@ class ServiceFabricClient extends ServiceClient { * 32 - select Cancelled * 64 - select ForceCancelled * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -62046,7 +60989,6 @@ class ServiceFabricClient extends ServiceClient { * Important note: if this API is invoked with force==true, internal state may * be left behind. * - * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * @@ -62114,7 +61056,6 @@ class ServiceFabricClient extends ServiceClient { * Important note: if this API is invoked with force==true, internal state may * be left behind. * - * * @param {uuid} operationId A GUID that identifies a call of this API. This * is passed into the corresponding GetProgress API * @@ -62178,7 +61119,6 @@ class ServiceFabricClient extends ServiceClient { * Creates a backup policy which can be associated later with a Service Fabric * application, service or a partition for periodic backup. * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -62197,7 +61137,6 @@ class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -62249,7 +61188,6 @@ class ServiceFabricClient extends ServiceClient { * Creates a backup policy which can be associated later with a Service Fabric * application, service or a partition for periodic backup. * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -62268,7 +61206,6 @@ class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -62343,7 +61280,6 @@ class ServiceFabricClient extends ServiceClient { * Service Fabric application, service or partition, cannot be deleted without * first deleting the mapping. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62384,7 +61320,6 @@ class ServiceFabricClient extends ServiceClient { * Service Fabric application, service or partition, cannot be deleted without * first deleting the mapping. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62443,7 +61378,6 @@ class ServiceFabricClient extends ServiceClient { * * Get a list of all the backup policies configured. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -62495,7 +61429,6 @@ class ServiceFabricClient extends ServiceClient { * * Get a list of all the backup policies configured. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -62570,7 +61503,6 @@ class ServiceFabricClient extends ServiceClient { * * Gets a particular backup policy identified by {backupPolicyName} * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62608,7 +61540,6 @@ class ServiceFabricClient extends ServiceClient { * * Gets a particular backup policy identified by {backupPolicyName} * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62671,7 +61602,6 @@ class ServiceFabricClient extends ServiceClient { * Returns a list of Service Fabric application, service or partition which are * associated with this backup policy. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62727,7 +61657,6 @@ class ServiceFabricClient extends ServiceClient { * Returns a list of Service Fabric application, service or partition which are * associated with this backup policy. * - * * @param {string} backupPolicyName The name of the backup policy. * * @param {object} [options] Optional Parameters. @@ -62803,7 +61732,6 @@ class ServiceFabricClient extends ServiceClient { * * Updates the backup policy identified by {backupPolicyName} * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -62822,7 +61750,6 @@ class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -62875,7 +61802,6 @@ class ServiceFabricClient extends ServiceClient { * * Updates the backup policy identified by {backupPolicyName} * - * * @param {object} backupPolicyDescription Describes the backup policy. * * @param {string} backupPolicyDescription.name The unique name identifying @@ -62894,7 +61820,6 @@ class ServiceFabricClient extends ServiceClient { * - Some of the log records since the last backup has been truncated, or * - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. * - * * @param {object} backupPolicyDescription.schedule Describes the backup * schedule parameters. * @@ -62973,7 +61898,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -62982,7 +61906,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -63029,7 +61952,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63038,7 +61960,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -63102,7 +62023,6 @@ class ServiceFabricClient extends ServiceClient { * Disables periodic backup of Service Fabric application which was previously * enabled. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63111,7 +62031,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63148,7 +62067,6 @@ class ServiceFabricClient extends ServiceClient { * Disables periodic backup of Service Fabric application which was previously * enabled. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63157,7 +62075,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63216,7 +62133,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the application * and the services and partitions under this application. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63225,7 +62141,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -63279,7 +62194,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the application * and the services and partitions under this application. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63288,7 +62202,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -63368,7 +62281,6 @@ class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63377,7 +62289,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63447,7 +62358,6 @@ class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} applicationId The identity of the application. This is * typically the full name of the application without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63456,7 +62366,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63555,7 +62464,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63603,7 +62511,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63670,7 +62577,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63716,7 +62622,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63781,7 +62686,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63790,7 +62694,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -63840,7 +62743,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63849,7 +62751,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} enableBackupDescription Specifies the parameters for * enabling backup. * @@ -63917,7 +62818,6 @@ class ServiceFabricClient extends ServiceClient { * service is part of, this service would continue to be periodically backed up * as per the policy mapped at the application level. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63926,7 +62826,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -63967,7 +62866,6 @@ class ServiceFabricClient extends ServiceClient { * service is part of, this service would continue to be periodically backed up * as per the policy mapped at the application level. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -63976,7 +62874,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64034,7 +62931,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the service and * the partitions under this service. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -64043,7 +62939,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -64096,7 +62991,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric backup configuration information for the service and * the partitions under this service. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -64105,7 +62999,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {string} [options.continuationToken] The continuation token parameter @@ -64185,7 +63078,6 @@ class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -64194,7 +63086,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64264,7 +63155,6 @@ class ServiceFabricClient extends ServiceClient { * the result based on start and end datetime or just fetching the latest * available backup for every partition. * - * * @param {string} serviceId The identity of the service. This is typically the * full name of the service without the 'fabric:' URI scheme. * Starting from version 6.0, hierarchical names are delimited with the "~" @@ -64273,7 +63163,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64371,7 +63260,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64418,7 +63306,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64485,7 +63372,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64531,7 +63417,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {object} [options] Optional Parameters. * * @param {number} [options.timeout] The server timeout for performing the @@ -64594,7 +63479,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} enableBackupDescription Specifies the parameters for @@ -64644,7 +63528,6 @@ class ServiceFabricClient extends ServiceClient { * Note only C# based Reliable Actor and Reliable Stateful services are * currently supported for periodic backup. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} enableBackupDescription Specifies the parameters for @@ -64714,7 +63597,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -64757,7 +63639,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -64817,7 +63698,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric Backup configuration information for the specified * partition. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -64856,7 +63736,6 @@ class ServiceFabricClient extends ServiceClient { * Gets the Service Fabric Backup configuration information for the specified * partition. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -64920,7 +63799,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -64974,7 +63852,6 @@ class ServiceFabricClient extends ServiceClient { * 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 {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65250,7 +64127,6 @@ class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater backup timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65318,7 +64194,6 @@ class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater backup timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65401,7 +64276,6 @@ class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest backup along with details * or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65440,7 +64314,6 @@ class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest backup along with details * or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65509,7 +64382,6 @@ class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater restore timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} restorePartitionDescription Describes the parameters to @@ -65581,7 +64453,6 @@ class ServiceFabricClient extends ServiceClient { * In case, the operation times out, specify a greater restore timeout value in * the query parameter. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} restorePartitionDescription Describes the parameters to @@ -65667,7 +64538,6 @@ class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest restore operation along * with details or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65707,7 +64577,6 @@ class ServiceFabricClient extends ServiceClient { * Returns information about the state of the latest restore operation along * with details or failure reason in case of completion. * - * * @param {uuid} partitionId The identity of the partition. * * @param {object} [options] Optional Parameters. @@ -65770,7 +64639,6 @@ class ServiceFabricClient extends ServiceClient { * (Application, Service or Partition) at the specified backup location * (FileShare or Azure Blob Storage). * - * * @param {object} getBackupByStorageQueryDescription Describes the filters and * backup storage details to be used for enumerating backups. * @@ -65859,7 +64727,6 @@ class ServiceFabricClient extends ServiceClient { * (Application, Service or Partition) at the specified backup location * (FileShare or Azure Blob Storage). * - * * @param {object} getBackupByStorageQueryDescription Describes the filters and * backup storage details to be used for enumerating backups. * @@ -66988,13 +65855,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67043,13 +65908,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67119,13 +65982,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67174,13 +66035,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67252,13 +66111,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67309,13 +66166,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67385,13 +66240,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67440,13 +66293,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67504,7 +66355,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -67525,13 +66375,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67568,7 +66416,6 @@ class ServiceFabricClient extends ServiceClient { * application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -67589,13 +66436,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67665,13 +66510,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67720,13 +66563,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67784,7 +66625,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -67805,13 +66645,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67848,7 +66686,6 @@ class ServiceFabricClient extends ServiceClient { * identity would be "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in * previous versions. * - * * @param {string} startTimeUtc The start time of a lookup query in ISO UTC * yyyy-MM-ddTHH:mm:ssZ. * @@ -67869,13 +66706,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -67945,13 +66780,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68000,13 +66833,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68078,13 +66909,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68135,13 +66964,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68211,13 +67038,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68266,13 +67091,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68346,13 +67169,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68405,13 +67226,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68483,13 +67302,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -68540,13 +67357,11 @@ class ServiceFabricClient extends ServiceClient { * @param {boolean} [options.excludeAnalysisEvents] This param disables the * retrieval of AnalysisEvents if true is passed. * - * * @param {boolean} [options.skipCorrelationLookup] 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. * - * * @param {object} [options.customHeaders] Headers that will be added to the * request *