FabricClient.ServiceManagementClient.UpdateServiceAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 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
- Uri
The URI name of the service being updated.
- updateDescription
- ServiceUpdateDescription
The ServiceUpdateDescription that specifies the updated configuration for the service.
Returns
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.
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 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 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
- Uri
The URI name of the service being updated.
- serviceUpdateDescription
- ServiceUpdateDescription
The ServiceUpdateDescription that specifies the updated configuration for the service.
- timeout
- TimeSpan
The maximum amount of time the system will allow this operation to continue before returning TimeoutException.
- cancellationToken
- CancellationToken
The CancellationToken that the operation is observing. It can be used to propagate notification that the operation should be canceled.
Returns
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.
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
Azure SDK for .NET