ReceivedSharesClient.GetReceivedShareAsync(String, RequestContext) Method

Definition

[Protocol Method] Get a received share by unique id.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetReceivedShareAsync (string receivedShareId, Azure.RequestContext context = default);
abstract member GetReceivedShareAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetReceivedShareAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetReceivedShareAsync (receivedShareId As String, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

receivedShareId
String

Id of the received share.

context
RequestContext

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

Returns

The response returned from the service.

Exceptions

receivedShareId is null.

receivedShareId 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 GetReceivedShareAsync with required parameters and parse the result.

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

Response response = await client.GetReceivedShareAsync("<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());

Remarks

Get a received share

Below is the JSON schema for the response payload.

Response Body:

InPlaceReceivedShareSchema for 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.
}

Applies to