Share via


TestabilityExtensions.RestartDeployedCodePackageAsync Method (FabricClient.ApplicationManagementClient, String, Uri, String, String, Int64, CompletionMode)

 

This API call restarts the code package as specified by the input parameters.

Namespace:   System.Fabric.Testability
Assembly:  System.Fabric.Testability (in System.Fabric.Testability.dll)

Syntax

public static Task<RestartDeployedCodePackageResult> RestartDeployedCodePackageAsync(
    this FabricClient.ApplicationManagementClient appManagementClient,
    string nodeName,
    Uri applicationName,
    string serviceManifestName,
    string codePackageName,
    long codePackageInstanceId,
    CompletionMode completionMode
)

Parameters

  • nodeName
    Type: System.String

    The node on which the code package is hosted.

  • applicationName
    Type: System.Uri

    The name of the application to which the code package belongs.

  • serviceManifestName
    Type: System.String

    The name of the service manifest where the code package is defined.

  • codePackageName
    Type: System.String

    The name of the code package to be restarted

  • codePackageInstanceId
    Type: System.Int64

    The code package instance id for the running code package which if specified and does not match then the restart is not processed If the value is 0 then the comparison is skipped.

Return Value

Type: System.Threading.Tasks.Task<RestartDeployedCodePackageResult>

RestartDeployedCodePackageResult which gives information about the actual code package restarted. SelectedReplica is None in this overload.

Exceptions

Exception Condition
TimeoutException

Action took more than its allocated time.

ArgumentNullException

Any of the required arguments are null.

InvalidOperationException

The code package was not in a valid running state.

FabricException

These are the fabric failures FabricErrorCode.CodePackageNotFound - If the selected code package was not found FabricErrorCode.InstanceIdMismatch - If the specified instance id did not match

Remarks

The CompletionMode options are DoNotVerify - Return after triggering the restart of the code package Verify - Return after the restart completes i.e. the code package has ome back up again.

See Also

RestartDeployedCodePackageAsync Overload
TestabilityExtensions Class
System.Fabric.Testability Namespace

Return to top