SentSharesClient.NotifyUserSentShareInvitationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
[Protocol Method] Notifies the recipient of the sent share invitation.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> NotifyUserSentShareInvitationAsync (string sentShareId, string sentShareInvitationId, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member NotifyUserSentShareInvitationAsync : string * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.NotifyUserSentShareInvitationAsync : string * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function NotifyUserSentShareInvitationAsync (sentShareId As String, sentShareInvitationId As String, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- sentShareId
- String
Id of the sent share.
- sentShareInvitationId
- String
Id of the sent share invitation.
- repeatabilityRequestId
- String
If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
sentShareId
or sentShareInvitationId
is null.
sentShareId
or sentShareInvitationId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call NotifyUserSentShareInvitationAsync with required parameters and parse the result.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new SentSharesClient(endpoint, credential);
Response response = await client.NotifyUserSentShareInvitationAsync("<sentShareId>", "<sentShareInvitationId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("invitationKind").ToString());
Console.WriteLine(result.ToString());
This sample shows how to call NotifyUserSentShareInvitationAsync with all parameters, and how to parse the result.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new SentSharesClient(endpoint, credential);
Response response = await client.NotifyUserSentShareInvitationAsync("<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());
Remarks
Notifies the user recipient of the sent share invitation, does not apply to service invitations.
Below is the JSON schema for the response payload.
Response Body:
This method takes one of the JSON objects below as a payload. Please select a JSON object to view the schema for this.
ServiceInvitation
Schema forServiceInvitation
:
{
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 more JSON objects
UserInvitation
Schema forUserInvitation
:
{
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.
}
Applies to
Azure SDK for .NET