SentSharesClient.GetSentShareAsync(String, RequestContext) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
[Método Protocol] Obtenga un recurso compartido enviado por guid.
- Este método de protocolo permite la creación explícita de la solicitud y el procesamiento de la respuesta para escenarios avanzados.
public virtual System.Threading.Tasks.Task<Azure.Response> GetSentShareAsync (string sentShareId, Azure.RequestContext context = default);
abstract member GetSentShareAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetSentShareAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetSentShareAsync (sentShareId As String, Optional context As RequestContext = Nothing) As Task(Of Response)
Parámetros
- sentShareId
- String
Id. del recurso compartido enviado.
- context
- RequestContext
Contexto de solicitud, que puede invalidar los comportamientos predeterminados de la canalización de cliente por llamada.
Devoluciones
Respuesta devuelta desde el servicio.
Excepciones
sentShareId
es null.
sentShareId
es una cadena vacía y se espera que no esté vacía.
El servicio devolvió un código de estado no correcto.
Ejemplos
En este ejemplo se muestra cómo llamar a GetSentShareAsync con los parámetros necesarios y analizar el resultado.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new SentSharesClient(endpoint, credential);
Response response = await client.GetSentShareAsync("<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());
Comentarios
Obtener un recurso compartido enviado
A continuación se muestra el esquema JSON para la carga de respuesta.
Cuerpo de la respuesta:
InPlaceSentShare
Esquema paraInPlaceSentShare
:{
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.
}
Se aplica a
Azure SDK for .NET