SentSharesClient.DeleteSentShareInvitation 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] Delete Invitation in a share.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Operation<BinaryData> DeleteSentShareInvitation (Azure.WaitUntil waitUntil, string sentShareId, string sentShareInvitationId, Azure.RequestContext context = default);
abstract member DeleteSentShareInvitation : Azure.WaitUntil * string * string * Azure.RequestContext -> Azure.Operation<BinaryData>
override this.DeleteSentShareInvitation : Azure.WaitUntil * string * string * Azure.RequestContext -> Azure.Operation<BinaryData>
Public Overridable Function DeleteSentShareInvitation (waitUntil As WaitUntil, sentShareId As String, sentShareInvitationId As String, Optional context As RequestContext = Nothing) As Operation(Of BinaryData)
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- sentShareId
- String
Id of the sent share.
- sentShareInvitationId
- String
Id of the sent share invitation.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Operation representing an asynchronous operation on 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 DeleteSentShareInvitation 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);
var operation = client.DeleteSentShareInvitation(WaitUntil.Completed, "<sentShareId>", "<sentShareInvitationId>");
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Remarks
Delete a sent share invitation
Below is the JSON schema for the response payload.
Response Body:
Schema for OperationResponse
:
{
endTime: string (ISO 8601 Format), # Optional. End time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
error: {
code: string, # Required. Code of the error
details: [PurviewShareErrorInfo], # Optional. Nested details of the error model
message: string, # Required. Message of the error
target: string, # Optional. Target of the error
}, # Optional. The purview share error body model.
id: string, # Optional. Job id of the long running operation
startTime: string (ISO 8601 Format), # Optional. Start time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
status: "Running" | "TransientFailure" | "Succeeded" | "Failed" | "NotStarted", # Required. States for long running operations.
}
Applies to
Azure SDK for .NET