SentShareInvitationsClient.GetSentShareInvitationAsync 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.
Obtenha o Convite para um determinado compartilhamento.
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
O nome do compartilhamento enviado.
- sentShareInvitationName
- String
Nome do convite enviado.
- 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. Os detalhes do esquema do corpo da resposta estão na seção Comentários abaixo.
Exceções
sentShareName
ou sentShareInvitationName
é nulo.
sentShareName
ou sentShareInvitationName
é 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 GetSentShareInvitationAsync com os parâmetros necessários e analisar o 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());
Comentários
Obter um convite de compartilhamento enviado
Abaixo está o esquema JSON para o conteúdo da resposta.
Corpo da resposta:
Esse método usa um dos objetos JSON abaixo como uma carga. Selecione um objeto JSON para exibir o esquema para isso.
ApplicationInvitation
Esquema paraApplicationInvitation
:{
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.
}
~+ Mais 1 objeto
UserInvitation
Esquema paraUserInvitation
:{
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.
}
Aplica-se a
Azure SDK for .NET