FabricClient.ServiceManagementClient.UpdateServiceAsync Method

Definition

Overloads

UpdateServiceAsync(Uri, ServiceUpdateDescription)

Updates a service with the specified description.

UpdateServiceAsync(Uri, ServiceUpdateDescription, TimeSpan, CancellationToken)

Updates a service with the specified description. Also takes in timeout interval, which is the maximum of time the system will allow this operation to continue before returning System.TimeoutException and cancellation-token that the operation is observing.

UpdateServiceAsync(Uri, ServiceUpdateDescription)

Updates a service with the specified description.

public System.Threading.Tasks.Task UpdateServiceAsync (Uri name, System.Fabric.Description.ServiceUpdateDescription updateDescription);
member this.UpdateServiceAsync : Uri * System.Fabric.Description.ServiceUpdateDescription -> System.Threading.Tasks.Task
Public Function UpdateServiceAsync (name As Uri, updateDescription As ServiceUpdateDescription) As Task

Parameters

name
System.Uri

The URI name of the service being updated.

updateDescription
ServiceUpdateDescription

The ServiceUpdateDescription that specifies the updated configuration for the service.

Returns

System.Threading.Tasks.Task

The updated service.

Exceptions

The FabricClient object is in a closed state. Dispose of theFabricClient object you are using and instantiate a new FabricClient object.

System.ArgumentNullException

When name or updateDescription are null.

Remarks

The default timeout is one minute for which the system will allow this operation to continue before returning System.TimeoutException.

NOTE: To safely increase both the MinReplicaSetSize and the TargetReplicaSetSize first increase the TargetReplicaSetSize and wait for additional replicas to be created and then increase the MinReplicaSetSize

Applies to

UpdateServiceAsync(Uri, ServiceUpdateDescription, TimeSpan, CancellationToken)

Updates a service with the specified description. Also takes in timeout interval, which is the maximum of time the system will allow this operation to continue before returning System.TimeoutException and cancellation-token that the operation is observing.

public System.Threading.Tasks.Task UpdateServiceAsync (Uri name, System.Fabric.Description.ServiceUpdateDescription serviceUpdateDescription, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.UpdateServiceAsync : Uri * System.Fabric.Description.ServiceUpdateDescription * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function UpdateServiceAsync (name As Uri, serviceUpdateDescription As ServiceUpdateDescription, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

name
System.Uri

The URI name of the service being updated.

serviceUpdateDescription
ServiceUpdateDescription

The ServiceUpdateDescription that specifies the updated configuration for the service.

timeout
System.TimeSpan

The maximum amount of time the system will allow this operation to continue before returning System.TimeoutException.

cancellationToken
System.Threading.CancellationToken

The System.Threading.CancellationToken that the operation is observing. It can be used to propagate notification that the operation should be canceled.

Returns

System.Threading.Tasks.Task

The updated service.

Exceptions

The FabricClient object is in a closed state. Dispose of theFabricClient object you are using and instantiate a new FabricClient object.

System.ArgumentNullException

When name or serviceUpdateDescription are null.

Remarks

NOTE: To safely increase both the MinReplicaSetSize and the TargetReplicaSetSize first increase the TargetReplicaSetSize and wait for additional replicas to be created and then increase the MinReplicaSetSize

Applies to