Dela via


AssetMappingsClient.DeleteAsync Method

Definition

Delete AssetMapping in a receivedShare.

public virtual System.Threading.Tasks.Task<Azure.Operation> DeleteAsync (Azure.WaitUntil waitUntil, string receivedShareName, string assetMappingName, Azure.RequestContext context = default);
abstract member DeleteAsync : Azure.WaitUntil * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
override this.DeleteAsync : Azure.WaitUntil * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function DeleteAsync (waitUntil As WaitUntil, receivedShareName As String, assetMappingName As String, Optional context As RequestContext = Nothing) As Task(Of Operation)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

receivedShareName
String

The name of the received share.

assetMappingName
String

The name of the asset mapping.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Operation representing an asynchronous operation on the service.

Exceptions

receivedShareName or assetMappingName is null.

receivedShareName or assetMappingName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call DeleteAsync with required parameters.

var credential = new DefaultAzureCredential();
var client = new AssetMappingsClient("<https://my-service.azure.com>", credential);

var operation = await client.DeleteAsync(WaitUntil.Completed, "<receivedShareName>", "<assetMappingName>");

var response = await operation.WaitForCompletionResponseAsync();
Console.WriteLine(response.Status)

Remarks

Delete an asset mapping for a received share.

Applies to