Sdílet prostřednictvím


FabricClient.ServiceManagementClient.DeleteServiceAsync Method

Definition

Overloads

DeleteServiceAsync(Uri, TimeSpan, CancellationToken)
Obsolete.

Deletes the specified service instance. 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.

DeleteServiceAsync(DeleteServiceDescription, TimeSpan, CancellationToken)

Deletes the specified service instance. 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.

DeleteServiceAsync(DeleteServiceDescription)

Deletes the specified service instance.

DeleteServiceAsync(Uri)
Obsolete.

Deletes the specified service instance.

DeleteServiceAsync(Uri, TimeSpan, CancellationToken)

Caution

This API is deprecated, use overload taking DeleteServiceDescription instead.

Deletes the specified service instance. 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.

[System.Obsolete("This API is deprecated, use overload taking DeleteServiceDescription instead.", false)]
public System.Threading.Tasks.Task DeleteServiceAsync (Uri serviceName, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("This API is deprecated, use overload taking DeleteServiceDescription instead.", false)>]
member this.DeleteServiceAsync : Uri * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function DeleteServiceAsync (serviceName As Uri, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

serviceName
Uri

The Service Fabric name of 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 deleted service instance.

Attributes

Exceptions

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

When serviceName is null.

Remarks

Service Fabric name will be implicitly and recursively deleted if the application is Service Fabric managed.

Applies to

DeleteServiceAsync(DeleteServiceDescription, TimeSpan, CancellationToken)

Deletes the specified service instance. 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 DeleteServiceAsync (System.Fabric.Description.DeleteServiceDescription deleteServiceDescription, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.DeleteServiceAsync : System.Fabric.Description.DeleteServiceDescription * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function DeleteServiceAsync (deleteServiceDescription As DeleteServiceDescription, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

deleteServiceDescription
DeleteServiceDescription

The description of the service to be deleted.

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 deleted service instance.

Exceptions

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

When deleteServiceDescription is null.

Remarks

Service Fabric name will be implicitly and recursively deleted if the application is Service Fabric managed.

A forceful deletion call can convert on-going normal deletion to forceful one.

Applies to

DeleteServiceAsync(DeleteServiceDescription)

Deletes the specified service instance.

public System.Threading.Tasks.Task DeleteServiceAsync (System.Fabric.Description.DeleteServiceDescription deleteServiceDescription);
member this.DeleteServiceAsync : System.Fabric.Description.DeleteServiceDescription -> System.Threading.Tasks.Task
Public Function DeleteServiceAsync (deleteServiceDescription As DeleteServiceDescription) As Task

Parameters

deleteServiceDescription
DeleteServiceDescription

The description of the service to be deleted.

Returns

The deleted service instance.

Exceptions

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

When deleteServiceDescription is null.

Remarks

Service Fabric name will be implicitly and recursively deleted if the application is Service Fabric managed.

A forceful deletion call can convert on-going normal deletion to forceful one.

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

Applies to

DeleteServiceAsync(Uri)

Caution

This API is deprecated, use overload taking DeleteServiceDescription instead.

Deletes the specified service instance.

[System.Obsolete("This API is deprecated, use overload taking DeleteServiceDescription instead.", false)]
public System.Threading.Tasks.Task DeleteServiceAsync (Uri serviceName);
[<System.Obsolete("This API is deprecated, use overload taking DeleteServiceDescription instead.", false)>]
member this.DeleteServiceAsync : Uri -> System.Threading.Tasks.Task
Public Function DeleteServiceAsync (serviceName As Uri) As Task

Parameters

serviceName
Uri

The Service Fabric name of the service.

Returns

The deleted service instance.

Attributes

Exceptions

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

When serviceName is null.

Remarks

Service Fabric name will be implicitly and recursively deleted if the application is Service Fabric managed.

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

Applies to