Update-ServiceFabricRepairTaskHealthPolicy
Updates the health policy of a repair task.
Syntax
Update-ServiceFabricRepairTaskHealthPolicy
[-TaskId] <String>
[-Version <Int64>]
[-PerformPreparingHealthCheck <Boolean>]
[-PerformRestoringHealthCheck <Boolean>]
[-Force]
[-TimeoutSec <Int32>]
[-WhatIf]
[-Confirm]
[<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.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TaskId
Specifies the ID of the repair task to update.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
System.Int64
System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Outputs
System.Object