AcceptedSentSharesClient.Revoke 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í.
Revocar el acceso de un recurso compartido enviado aceptado.
public virtual Azure.Operation<BinaryData> Revoke (Azure.WaitUntil waitUntil, string sentShareName, string acceptedSentShareName, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member Revoke : Azure.WaitUntil * string * string * string * Azure.RequestContext -> Azure.Operation<BinaryData>
override this.Revoke : Azure.WaitUntil * string * string * string * Azure.RequestContext -> Azure.Operation<BinaryData>
Public Overridable Function Revoke (waitUntil As WaitUntil, sentShareName As String, acceptedSentShareName As String, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Operation(Of BinaryData)
Parámetros
- waitUntil
- WaitUntil
Completed si el método debe esperar a que se devuelva hasta que se haya completado la operación de larga duración en el servicio; Started si debe devolverse después de iniciar la operación. Para más información sobre las operaciones de larga duración, consulte Ejemplos de operaciones de azure.Core Long-Running.
- sentShareName
- String
Nombre del recurso compartido enviado.
- acceptedSentShareName
- String
Nombre del recurso compartido enviado aceptado.
- 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
del Operation<T> servicio que contendrá un BinaryData objeto una vez completada la operación asincrónica en el servicio. Los detalles del esquema del cuerpo para el valor final de la operación se encuentran en la sección Comentarios a continuación.
Excepciones
sentShareName
o acceptedSentShareName
es null.
sentShareName
o acceptedSentShareName
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 Revoke con los parámetros necesarios y analizar el resultado.
var credential = new DefaultAzureCredential();
var client = new AcceptedSentSharesClient("<https://my-service.azure.com>", credential);
var operation = client.Revoke(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>");
BinaryData data = operation.WaitForCompletion();
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.ToString());
En este ejemplo se muestra cómo llamar a Revoke con todos los parámetros y cómo analizar el resultado.
var credential = new DefaultAzureCredential();
var client = new AcceptedSentSharesClient("<https://my-service.azure.com>", credential);
var operation = client.Revoke(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>", "<repeatabilityRequestId>");
BinaryData data = operation.WaitForCompletion();
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());
Comentarios
Revocar un recurso compartido enviado aceptado
A continuación se muestra el esquema JSON para la carga de respuesta.
Cuerpo de la respuesta:
InPlaceAcceptedSentShare
Esquema paraInPlaceAcceptedSentShare
:{
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.
}
Se aplica a
Azure SDK for .NET