次の方法で共有


AcceptedSentSharesClient.UpdateExpiration メソッド

定義

アクティブな承認済みの送信済み共有の有効期限を更新します。

public virtual Azure.Operation<BinaryData> UpdateExpiration (Azure.WaitUntil waitUntil, string sentShareName, string acceptedSentShareName, Azure.Core.RequestContent content, string repeatabilityRequestId = default, Azure.RequestContext context = default);
abstract member UpdateExpiration : Azure.WaitUntil * string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Operation<BinaryData>
override this.UpdateExpiration : Azure.WaitUntil * string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Operation<BinaryData>
Public Overridable Function UpdateExpiration (waitUntil As WaitUntil, sentShareName As String, acceptedSentShareName As String, content As RequestContent, Optional repeatabilityRequestId As String = Nothing, Optional context As RequestContext = Nothing) As Operation(Of BinaryData)

パラメーター

waitUntil
WaitUntil

Completed メソッドが、サービスで実行時間の長い操作が完了するまで戻るまで待機する必要がある場合。 Started 操作を開始した後に が返される場合は 。 実行時間の長い操作の詳細については、「 Azure.Core Long-Running 操作のサンプル」を参照してください。

sentShareName
String

送信された共有の名前。

acceptedSentShareName
String

承認済みの送信済み共有の名前。

content
RequestContent

要求の本文として送信するコンテンツ。 要求本文スキーマの詳細については、以下の「解説」セクションを参照してください。

repeatabilityRequestId
String

指定した場合、クライアントは要求が繰り返し可能であることを指示します。つまり、クライアントは同じ Repeatability-Request-Id を使用して要求を複数回行い、サーバーが要求を複数回実行せずに適切な応答を返すことができます。 Repeatability-Request-Id の値は、クライアントによって生成され、常にグローバルに一意である要求の識別子を表す不透明な文字列です。 バージョン 4 (ランダム) UUID を使用することをお勧めします。

context
RequestContext

要求コンテキスト。これは、クライアント パイプラインの既定の動作を呼び出しごとにオーバーライドできます。

戻り値

Operation<T>サービスに対する非同期操作が完了した後に オブジェクトを格納BinaryDataするサービスの 。 操作の最終値の本文スキーマの詳細については、以下の「解説」セクションを参照してください。

例外

sentShareNameacceptedSentShareName、または content が null です。

sentShareName または acceptedSentShareName が空の文字列であり、空でないと想定されていました。

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要なパラメーターと要求コンテンツを使用して UpdateExpiration を呼び出す方法と、結果を解析する方法を示します。

var credential = new DefaultAzureCredential();
var client = new AcceptedSentSharesClient("<https://my-service.azure.com>", credential);

var data = new {
    shareKind = "InPlace",
    properties = new {},
};

var operation = client.UpdateExpiration(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>", RequestContent.Create(data));

BinaryData data = operation.WaitForCompletion();
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.ToString());

このサンプルでは、すべてのパラメーターと要求コンテンツを使用して UpdateExpiration を呼び出す方法と、結果を解析する方法を示します。

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 = client.UpdateExpiration(WaitUntil.Completed, "<sentShareName>", "<acceptedSentShareName>", RequestContent.Create(data), "<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());

注釈

承認済みの送信済み共有の有効期限を更新する

要求と応答のペイロードの JSON スキーマを次に示します。

要求本文:

InPlaceAcceptedSentShareInPlaceAcceptedSentShareスキーマ:
{
              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.
            }

応答本文:

InPlaceAcceptedSentShareInPlaceAcceptedSentShareスキーマ:
{
              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.
            }

適用対象