ReceivedSharesClient.GetReceivedShareAsync(String, RequestContext) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
[Méthode de protocole] Obtenir un partage reçu par ID unique.
- 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 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)
Paramètres
- receivedShareId
- String
ID du partage reçu.
- 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
receivedShareId
a la valeur null.
receivedShareId
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 GetReceivedShareAsync 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 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());
Remarques
Obtenir un partage reçu
Vous trouverez ci-dessous le schéma JSON pour la charge utile de réponse.
Corps de réponse :
InPlaceReceivedShare
Schéma pourInPlaceReceivedShare
:{
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.
}
S’applique à
Azure SDK for .NET
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour