Partager via


SentSharesClient.DeleteSentShareInvitationAsync Méthode

Définition

[Méthode de protocole] Supprimer l’invitation dans un partage.

  • Cette méthode de protocole permet la création explicite de la demande et le traitement de la réponse pour les scénarios avancés.
public virtual System.Threading.Tasks.Task<Azure.Operation<BinaryData>> DeleteSentShareInvitationAsync (Azure.WaitUntil waitUntil, string sentShareId, string sentShareInvitationId, Azure.RequestContext context = default);
abstract member DeleteSentShareInvitationAsync : Azure.WaitUntil * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
override this.DeleteSentShareInvitationAsync : Azure.WaitUntil * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
Public Overridable Function DeleteSentShareInvitationAsync (waitUntil As WaitUntil, sentShareId As String, sentShareInvitationId As String, Optional context As RequestContext = Nothing) As Task(Of Operation(Of BinaryData))

Paramètres

waitUntil
WaitUntil

Completed si la méthode doit attendre la fin de l’opération de longue durée sur le service ; Started s’il doit retourner après le démarrage de l’opération. Pour plus d’informations sur les opérations de longue durée, consultez Exemples d’opérations Azure.Core Long-Running.

sentShareId
String

ID du partage envoyé.

sentShareInvitationId
String

ID de l’invitation de partage envoyée.

context
RequestContext

Contexte de demande, qui peut remplacer les comportements par défaut du pipeline client par appel.

Retours

Operation représentant une opération asynchrone sur le service.

Exceptions

sentShareId ou sentShareInvitationId est null.

sentShareId ou sentShareInvitationId est une chaîne vide, et on s’attendait à ce qu’elle ne soit pas vide.

Le service a retourné un code de status non réussi.

Exemples

Cet exemple montre comment appeler DeleteSentShareInvitationAsync avec les paramètres requis et analyser le résultat.

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

var operation = await client.DeleteSentShareInvitationAsync(WaitUntil.Completed, "<sentShareId>", "<sentShareInvitationId>");

BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());

Remarques

Supprimer une invitation de partage envoyée

Vous trouverez ci-dessous le schéma JSON pour la charge utile de réponse.

Corps de réponse :

Schéma pour OperationResponse:

{
  endTime: string (ISO 8601 Format), # Optional. End time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
  error: {
    code: string, # Required. Code of the error
    details: [PurviewShareErrorInfo], # Optional. Nested details of the error model
    message: string, # Required. Message of the error
    target: string, # Optional. Target of the error
  }, # Optional. The purview share error body model.
  id: string, # Optional. Job id of the long running operation
  startTime: string (ISO 8601 Format), # Optional. Start time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
  status: "Running" | "TransientFailure" | "Succeeded" | "Failed" | "NotStarted", # Required. States for long running operations.
}

S’applique à