SentSharesClient.NotifyUserSentShareInvitation 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] Notifica al destinatario de la invitación de recurso compartido enviada.
- 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 Azure.Response NotifyUserSentShareInvitation (string sentShareId, string sentShareInvitationId, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member NotifyUserSentShareInvitation : string * string * string * Azure.RequestContext -> Azure.Response
override this.NotifyUserSentShareInvitation : string * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function NotifyUserSentShareInvitation (sentShareId As String, sentShareInvitationId As String, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Response
Parámetros
- sentShareId
- String
Id. del recurso compartido enviado.
- sentShareInvitationId
- String
Identificador de la invitación de recurso compartido enviada.
- repeatabilityRequestId
- String
Si se especifica, el cliente dirige que se puede repetir la solicitud; es decir, que el cliente puede realizar la solicitud varias veces con el mismo Repeatability-Request-Id y obtener una respuesta adecuada sin que el servidor ejecute la solicitud varias veces. El valor de Repeatability-Request-Id es una cadena opaca que representa un identificador globalmente único y generado por el cliente para toda la solicitud. Se recomienda usar UUID de la versión 4 (aleatoria).
- 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
o sentShareInvitationId
es null.
sentShareId
o sentShareInvitationId
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 NotifyUserSentShareInvitation 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 = client.NotifyUserSentShareInvitation("<sentShareId>", "<sentShareInvitationId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("invitationKind").ToString());
Console.WriteLine(result.ToString());
En este ejemplo se muestra cómo llamar a NotifyUserSentShareInvitation con todos los parámetros y cómo analizar el resultado.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new SentSharesClient(endpoint, credential);
Response response = client.NotifyUserSentShareInvitation("<sentShareId>", "<sentShareInvitationId>", "<repeatabilityRequestId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("invitationKind").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Comentarios
Notifica al destinatario del usuario de la invitación de recurso compartido enviado, no se aplica a las invitaciones de servicio.
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.
ServiceInvitation
Esquema paraServiceInvitation
:{
properties: {
expirationDate: string (ISO 8601 Format), # Optional. The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
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. 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.
state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
targetActiveDirectoryId: Guid, # Required. The target azure active directory id the invitation is sent to.
targetObjectId: Guid, # Required. The target object id in the azure active directory the invitation is sent to.
}, # Required. Properties of the service invitation type.
invitationKind: Service, # Required. The types of invitations.
id: string, # Optional. The unique id of the resource.
type: string, # Optional. Type of the resource.
}
~+ 1 objetos
UserInvitation
Esquema paraUserInvitation
:{
properties: {
expirationDate: string (ISO 8601 Format), # Optional. The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
notify: boolean, # Optional. Whether or not the recipient was notified via email.
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. 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.
state: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed", # Optional. State of the resource
targetEmail: string, # Required. The receiver email for the invitation is being sent.
}, # Required. Properties of the user invitation type.
invitationKind: User, # Required. The types of invitations.
id: string, # Optional. The unique id of the resource.
type: string, # Optional. Type of the resource.
}
Se aplica a
Azure SDK for .NET