Compartir a través de


SentShareInvitationsClient.GetSentShareInvitationAsync Método

Definición

Obtener invitación para un recurso compartido determinado.

public virtual System.Threading.Tasks.Task<Azure.Response> GetSentShareInvitationAsync (string sentShareName, string sentShareInvitationName, Azure.RequestContext context = default);
abstract member GetSentShareInvitationAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetSentShareInvitationAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetSentShareInvitationAsync (sentShareName As String, sentShareInvitationName As String, Optional context As RequestContext = Nothing) As Task(Of Response)

Parámetros

sentShareName
String

Nombre del recurso compartido enviado.

sentShareInvitationName
String

Nombre de la invitación enviada.

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. Los detalles del esquema del cuerpo de la respuesta se encuentran en la sección Comentarios a continuación.

Excepciones

sentShareName o sentShareInvitationName es null.

sentShareName o sentShareInvitationName 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 GetSentShareInvitationAsync con los parámetros necesarios y analizar el resultado.

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

Response response = await client.GetSentShareInvitationAsync("<sentShareName>", "<sentShareInvitationName>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("invitationKind").ToString());

Comentarios

Obtener una invitación de recurso compartido enviada

A continuación se muestra el esquema JSON para la carga de respuesta.

Cuerpo de la respuesta:

Este método toma uno de los objetos JSON siguientes como una carga útil. Seleccione un objeto JSON para ver el esquema.

ApplicationInvitation Esquema para ApplicationInvitation:
{
              invitationKind: Application, # Required. The types of invitations.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                expirationDate: string (ISO 8601 Format), # Optional. The expiration date for the invitation
                invitationId: string, # Optional. Id of the invitation
                invitationStatus: "Pending" | "Accepted" | "Rejected", # Optional. Status of the invitation.
                provisioningState: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed" | "SoftDeleting" | "SoftDeleted" | "SourceMoved" | "SourceDeleted" | "TargetMoved" | "TargetDeleted", # Optional. Provisioning status of the resource
                respondedAt: string (ISO 8601 Format), # Optional. The time the recipient responded to the invitation.
                senderEmail: string, # Optional. Email address of the sender.
                senderName: string, # Optional. Name of the sender
                senderTenantName: string, # Optional. Tenant name of the sender
                sentAt: string (ISO 8601 Format), # Optional. Gets the time at which the invitation was sent.
                shareKind: "InPlace", # Optional. Defines the supported types for share.
                targetActiveDirectoryId: string, # Required. The target azure active directory id the invitation is sent to.
                targetObjectId: string, # Required. The target object id in the azure active directory the invitation is sent to.
              }, # Required. Properties of the application invitation type.
            }
~+ 1 objetos
JSON más UserInvitation Esquema para UserInvitation:
{
              invitationKind: User, # Required. The types of invitations.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                expirationDate: string (ISO 8601 Format), # Optional. The expiration date for the invitation
                invitationId: string, # Optional. Id of the invitation
                invitationStatus: "Pending" | "Accepted" | "Rejected", # Optional. Status of the invitation.
                provisioningState: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed" | "SoftDeleting" | "SoftDeleted" | "SourceMoved" | "SourceDeleted" | "TargetMoved" | "TargetDeleted", # Optional. Provisioning status of the resource
                respondedAt: string (ISO 8601 Format), # Optional. The time the recipient responded to the invitation.
                senderEmail: string, # Optional. Email address of the sender.
                senderName: string, # Optional. Name of the sender
                senderTenantName: string, # Optional. Tenant name of the sender
                sentAt: string (ISO 8601 Format), # Optional. Gets the time at which the invitation was sent.
                shareKind: "InPlace", # Optional. Defines the supported types for share.
                targetEmail: string, # Required. The receiver email for the invitation is being sent.
              }, # Required. Properties of the user invitation type.
            }

Se aplica a