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
appManagementClient
Type: System.Fabric.FabricClient.ApplicationManagementClientThe ApplicationManagementClient instance on which the API is called.
nodeName
Type: System.StringThe node on which the code package is hosted.
applicationName
Type: System.UriThe name of the application to which the code package belongs.
serviceManifestName
Type: System.StringThe name of the service manifest where the code package is defined.
codePackageName
Type: System.StringThe name of the code package to be restarted
codePackageInstanceId
Type: System.Int64The 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.
completionMode
Type: System.Fabric.Testability.CompletionModeThe CompletionMode that specifies whether to wait until the restart of the code package completes or not.
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