Freigeben über


ReceivedSharesClient.GetReceivedShare(String, RequestContext) Methode

Definition

[Protokollmethode] Abrufen einer empfangenen Freigabe nach eindeutiger ID.

  • Diese Protokollmethode ermöglicht die explizite Erstellung der Anforderung und Verarbeitung der Antwort für erweiterte Szenarien.
public virtual Azure.Response GetReceivedShare (string receivedShareId, Azure.RequestContext context = default);
abstract member GetReceivedShare : string * Azure.RequestContext -> Azure.Response
override this.GetReceivedShare : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetReceivedShare (receivedShareId As String, Optional context As RequestContext = Nothing) As Response

Parameter

receivedShareId
String

ID der empfangenen Freigabe.

context
RequestContext

Der Anforderungskontext, der das Standardverhalten der Clientpipeline pro Aufruf außer Kraft setzen kann.

Gibt zurück

Die vom Dienst zurückgegebene Antwort.

Ausnahmen

receivedShareId ist NULL.

receivedShareId ist eine leere Zeichenfolge und wurde erwartet, dass sie nicht leer ist.

Der Dienst hat einen nicht erfolgreichen status Code zurückgegeben.

Beispiele

In diesem Beispiel wird gezeigt, wie GetReceivedShare mit den erforderlichen Parametern aufgerufen und das Ergebnis analysiert wird.

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

Response response = client.GetReceivedShare("<receivedShareId>");

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());

Hinweise

Abrufen einer empfangenen Freigabe

Im Folgenden finden Sie das JSON-Schema für die Antwortnutzlast.

Antworttext:

InPlaceReceivedShareSchema für InPlaceReceivedShare:
{
  properties: {
    assetLocation: string, # Optional. Location of the shared Asset.
    assetStoreKind: "AdlsGen2Account" | "BlobAccount", # Optional. The types of asset.
    createdAt: string (ISO 8601 Format), # Optional. Time at which the received share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
    displayName: string, # Optional. Received Share Name
    expirationDate: string (ISO 8601 Format), # Optional. The expiration date of the received share. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
    receiverEmail: string, # Optional. Email of the user/receiver who received the sent share invitation
    receiverName: string, # Optional. Name of the user/receiver who received the sent share invitation
    receiverTenantName: string, # Optional. Tenant name of the user/receiver who received the sent share invitation
    senderEmail: string, # Optional. Email of the sender who created the sent share invitation
    senderName: string, # Optional. Name of the sender who created the sent share invitation
    senderTenantName: string, # Optional. Tenant name of the sender who created the sent share invitation
    sentShareDescription: string, # Optional. Share description.
    sharedAt: string (ISO 8601 Format), # Optional. Time at which the sent share was shared. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
    shareStatus: "Detached" | "Attached", # Optional. Share status.
    sink: {
      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.
    }, # Optional. Holds details on the destination of the mapped artifact
    state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
  }, # Required. Properties of in place received 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.
}

Gilt für: