Complete-ServiceFabricRepairTask

Reports that a manual repair task is finished.

Syntax

Complete-ServiceFabricRepairTask
        [-TaskId] <String>
        [[-Version] <Int64>]
        [-ResultStatus <RepairTaskResult>]
        [-ResultCode <Int32>]
        [-ResultDetails <String>]
        [-Force]
        [-TimeoutSec <Int32>]
        [-WhatIf]
        [-Confirm]
        [<CommonParameters>]

Description

The Complete-ServiceFabricRepairTask cmdlet reports that a manual Service Fabric repair task is finished. After you run this cmdlet, the repair task is no longer approved to be run. No additional repair work is started on the entities described by the repair task. If you are unsure of the status of the repair work, do not report completion of the repair task. Performing repair work after you run this cmdlet can result in availability or data loss. If subsequent repairs are needed, start a new repair task and wait for approval of that repair task.

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: Complete a manual repair task successfully

PS C:\> Complete-ServiceFabricRepairTask -TaskId MyRepairTaskID

This command marks the manual repair task that has the ID MyRepairTaskId as completed successfully.

Example 2: Complete a manual repair task with details

PS C:\> Complete-ServiceFabricRepairTask -TaskId MyRepairTaskID -ResultStatus Cancelled -ResultCode 42 -ResultDetails "Repair was no longer needed"

This command marks the manual repair task that has the ID MyRepairTaskId as cancelled and includes additional details.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run even if the specified repair task does not appear to be a manual repair task.

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

-ResultCode

Specifies a value that provides additional details about the result of the repair task.

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

-ResultDetails

Specifies a string that provide additional details about the result of the repair task.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResultStatus

Specifies a value that describes the overall result of the repair task. Valid values are:

  • Invalid. Do not specify this value.
  • Succeeded. The repair task succeeded.
  • Cancelled. The repair task was cancelled.
  • Interrupted. The repair task was interrupted.
  • Failed. The repair task failed.
  • Pending. Do not specify this value.
Type:RepairTaskResult
Accepted values:Invalid, Succeeded, Cancelled, Interrupted, Failed, Pending
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TaskId

Specifies the ID of the repair task to complete.

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:1
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:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

System.Int64

Outputs

System.Object