AcceptedSentSharesClient.ReinstateAsync 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.
Reinstate a revoked accepted sent share.
public virtual System.Threading.Tasks.Task<Azure.Operation<BinaryData>> ReinstateAsync (Azure.WaitUntil waitUntil, string sentShareName, string acceptedSentShareName, Azure.Core.RequestContent content, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member ReinstateAsync : Azure.WaitUntil * string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
override this.ReinstateAsync : Azure.WaitUntil * string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation<BinaryData>>
Public Overridable Function ReinstateAsync (waitUntil As WaitUntil, sentShareName As String, acceptedSentShareName As String, content As RequestContent, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of 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.
- sentShareName
- String
The name of the sent share.
- acceptedSentShareName
- String
The name of the accepted sent share.
- content
- RequestContent
The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
- 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 Operation<T> from the service that will contain a BinaryData object once the asynchronous operation on the service has completed. Details of the body schema for the operation's final value are in the Remarks section below.
Exceptions
sentShareName
, acceptedSentShareName
or content
is null.
sentShareName
or acceptedSentShareName
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 ReinstateAsync with required parameters and request content, and how to parse the result.
var credential = new DefaultAzureCredential();
var client = new AcceptedSentSharesClient("<https://my-service.azure.com>", credential);
var data = new {
shareKind = "InPlace",
properties = new {},
};
var operation = await client.ReinstateAsync(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>", RequestContent.Create(data));
BinaryData data = await operation.WaitForCompletionAsync();
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call ReinstateAsync with all parameters and request content, and how to parse the result.
var credential = new DefaultAzureCredential();
var client = new AcceptedSentSharesClient("<https://my-service.azure.com>", credential);
var data = new {
shareKind = "InPlace",
properties = new {
expirationDate = "<2022-05-10T14:57:31.2311892-04:00>",
},
};
var operation = await client.ReinstateAsync(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>", RequestContent.Create(data), "<repeatabilityRequestId>");
BinaryData data = await operation.WaitForCompletionAsync();
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("shareKind").ToString());
Remarks
Reinstate a revoked accepted sent share
Below is the JSON schema for the request and response payloads.
Request Body:
InPlaceAcceptedSentShare
Schema forInPlaceAcceptedSentShare
:
{
shareKind: InPlace, # Required. Defines the supported types for share.
id: string, # Optional. The resource id of the resource.
name: string, # Optional. Name of the resource.
type: string, # Optional. Type of the resource.
properties: {
createdAt: string (ISO 8601 Format), # Optional. created at
expirationDate: string (ISO 8601 Format), # Optional. Expiration date of the received share in UTC format
receivedShareStatus: "Active" | "Reinstating" | "Revoked" | "Revoking" | "RevokeFailed" | "ReinstateFailed" | "SourceDeleted", # Optional. received share status
receiverEmail: string, # Optional. Email of the user/receiver who received the sent share invitation and created the received share
receiverName: string, # Optional. Name of the user/receiver who received the sent share invitation and created the received share
receiverTargetObjectId: string, # Optional. Receiver's target object id
receiverTenantName: string, # Optional. Tenant name of the user/receiver who received the sent share invitation and created the received share
senderEmail: string, # Optional. Email of the sender who created the sent share invitation
senderName: string, # Optional. Name of the sender who created the sent share invitation
senderTenantName: string, # Optional. Tenant name of the sender who created the sent share invitation
sharedAt: string (ISO 8601 Format), # Optional. Shared at
}, # Required. Properties of in place accepted sent share.
}
Response Body:
InPlaceAcceptedSentShare
Schema forInPlaceAcceptedSentShare
:
{
shareKind: InPlace, # Required. Defines the supported types for share.
id: string, # Optional. The resource id of the resource.
name: string, # Optional. Name of the resource.
type: string, # Optional. Type of the resource.
properties: {
createdAt: string (ISO 8601 Format), # Optional. created at
expirationDate: string (ISO 8601 Format), # Optional. Expiration date of the received share in UTC format
receivedShareStatus: "Active" | "Reinstating" | "Revoked" | "Revoking" | "RevokeFailed" | "ReinstateFailed" | "SourceDeleted", # Optional. received share status
receiverEmail: string, # Optional. Email of the user/receiver who received the sent share invitation and created the received share
receiverName: string, # Optional. Name of the user/receiver who received the sent share invitation and created the received share
receiverTargetObjectId: string, # Optional. Receiver's target object id
receiverTenantName: string, # Optional. Tenant name of the user/receiver who received the sent share invitation and created the received share
senderEmail: string, # Optional. Email of the sender who created the sent share invitation
senderName: string, # Optional. Name of the sender who created the sent share invitation
senderTenantName: string, # Optional. Tenant name of the sender who created the sent share invitation
sharedAt: string (ISO 8601 Format), # Optional. Shared at
}, # Required. Properties of in place accepted sent share.
}