Update-​Service​Fabric​Repair​Task​Health​Policy

Updates the health policy of a repair task.

Syntax

Update-ServiceFabricRepairTaskHealthPolicy
      [-TaskId] <String>
      [-Force]
      [-PerformPreparingHealthCheck <Boolean>]
      [-PerformRestoringHealthCheck <Boolean>]
      [-TimeoutSec <Int32>]
      [-Version <Int64>]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Update-ServiceFabricRepairTaskHealthPolicy cmdlet updates the health policy of a repair task. This functionality is currently only available in specially configured Azure Cloud Services.

This cmdlet supports the Service Fabric platform. Do not run this cmdlet directly.

This cmdlet requires that you connect to the cluster with credentials that are granted administrator access to the cluster. Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

Examples

Example 1: Update a repair task health policy to perform a cluster health check

PS C:\> Update-ServiceFabricRepairTaskHealthPolicy -TaskId "MyRepairTaskId" -PerformPreparingHealthCheck $True -PerformRestoringHealthCheck $True

This command updates the health policy of the repair task. This command performs a cluster health check for the Preparing and Restoring states.

Example 2: Update the repair task health policy to perform a cluster health check in the Restoring state

PS C:\> Update-ServiceFabricRepairTaskHealthPolicy -TaskId "MyRepairTaskId" -PerformRestoringHealthCheck $true

This command updates the health policy of the repair task. This command performs a cluster health check for Restoring state. This example leaves the Preparing state as it is.

Required Parameters

-TaskId

Specifies the ID of the repair task to update.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PerformPreparingHealthCheck

Specifies whether a cluster health check is to be performed in the Preparing state of the repair task.

Type:Boolean
Position:Named
Default value:False
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PerformRestoringHealthCheck

Specifies whether a cluster health check is to be performed in the Restoring state of the repair task.

Type:Boolean
Position:Named
Default value:False
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Version

Specifies the current version of the repair task. The request can succeed only if the value that this parameter specifies matches the current value of the repair task. Specify a value of zero (0) to skip version check.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

System.Object

This cmdlet returns an object that contains the Version of the updated repair task.