Partager via


SentSharesClient.GetSentShare(String, RequestContext) Méthode

Définition

[Méthode de protocole] Obtenir un partage envoyé par guid.

  • 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 Azure.Response GetSentShare (string sentShareId, Azure.RequestContext context = default);
abstract member GetSentShare : string * Azure.RequestContext -> Azure.Response
override this.GetSentShare : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetSentShare (sentShareId As String, Optional context As RequestContext = Nothing) As Response

Paramètres

sentShareId
String

ID du partage envoyé.

context
RequestContext

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

Retours

Réponse retournée par le service.

Exceptions

sentShareId a la valeur null.

sentShareId 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 GetSentShare 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);

Response response = client.GetSentShare("<sentShareId>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("shareKind").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("type").ToString());

Remarques

Obtenir un partage envoyé

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

Corps de réponse :

InPlaceSentShareSchéma pour InPlaceSentShare:
{
  properties: {
    artifact: {
      storeKind: "AdlsGen2Account" | "BlobAccount", # Required. The types of asset.
      storeReference: {
        referenceName: string, # Optional. Reference name for resource associated with the sink or artifact.
        type: "ArmResourceReference", # Optional. Defines the type of resource being shared
      }, # Required. A Store Reference for an artifact or sink.
    }, # Required. A class for sent share artifact.
    createdAt: string (ISO 8601 Format), # Optional. Time at which the sent share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
    dependsOn: [Guid], # Optional. List of shares on which the sent share depends.
    description: string, # Optional. Sent share description.
    displayName: string, # Required. The name of the sent share
    senderEmail: string, # Optional. Email of the sender who created the sent share.
    senderName: string, # Optional. Name of the sender who created the sent share.
    senderTenantName: string, # Optional. Tenant name of the sender who created the sent share.
    state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
  }, # Required. Properties for InPlace sent share.
  shareKind: InPlace, # Required. Defines the supported types for share.
  id: string, # Optional. The unique id of the resource.
  type: string, # Optional. Type of the resource.
}

S’applique à