ReceivedSharesClient.GetReceivedShareAsync(String, RequestContext) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
[Método protocol] Obtenha um compartilhamento recebido por ID exclusiva.
- Esse método de protocolo permite a criação explícita da solicitação e o processamento da resposta para cenários avançados.
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)
Parâmetros
- receivedShareId
- String
Id do compartilhamento recebido.
- context
- RequestContext
O contexto de solicitação, que pode substituir os comportamentos padrão do pipeline do cliente por chamada.
Retornos
A resposta retornada do serviço.
Exceções
receivedShareId
é nulo.
receivedShareId
é uma cadeia de caracteres vazia e esperava-se que não estivesse vazia.
O serviço retornou um código de status sem êxito.
Exemplos
Este exemplo mostra como chamar GetReceivedShareAsync com os parâmetros necessários e analisar o resultado.
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());
Comentários
Obter um compartilhamento recebido
Abaixo está o esquema JSON para o conteúdo da resposta.
Corpo da resposta:
InPlaceReceivedShare
Esquema paraInPlaceReceivedShare
:{
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.
}
Aplica-se a
Azure SDK for .NET