IDocumentClient.ReadUserDefinedFunctionFeedAsync メソッド

定義

オーバーロード

ReadUserDefinedFunctionFeedAsync(Uri, FeedOptions)

Azure Cosmos DB サービスの非同期操作として、コレクションのユーザー定義関数のフィード (シーケンス) を読み取ります。

ReadUserDefinedFunctionFeedAsync(String, FeedOptions)

Azure Cosmos DB サービスからコレクションの UserDefinedFunction フィード (シーケンス) を非同期操作として読み取ります。

ReadUserDefinedFunctionFeedAsync(Uri, FeedOptions)

Azure Cosmos DB サービスの非同期操作として、コレクションのユーザー定義関数のフィード (シーケンス) を読み取ります。

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.FeedResponse<Microsoft.Azure.Documents.UserDefinedFunction>> ReadUserDefinedFunctionFeedAsync (Uri documentCollectionUri, Microsoft.Azure.Documents.Client.FeedOptions options = default);
abstract member ReadUserDefinedFunctionFeedAsync : Uri * Microsoft.Azure.Documents.Client.FeedOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.FeedResponse<Microsoft.Azure.Documents.UserDefinedFunction>>
Public Function ReadUserDefinedFunctionFeedAsync (documentCollectionUri As Uri, Optional options As FeedOptions = Nothing) As Task(Of FeedResponse(Of UserDefinedFunction))

パラメーター

documentCollectionUri
Uri

親ドキュメント コレクションの URI。

options
FeedOptions

(省略可能) FeedOptions 要求の 。

戻り値

非同期操作のサービス応答を表すタスク オブジェクト。

適用対象

ReadUserDefinedFunctionFeedAsync(String, FeedOptions)

Azure Cosmos DB サービスからコレクションの UserDefinedFunction フィード (シーケンス) を非同期操作として読み取ります。

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.FeedResponse<Microsoft.Azure.Documents.UserDefinedFunction>> ReadUserDefinedFunctionFeedAsync (string userDefinedFunctionsLink, Microsoft.Azure.Documents.Client.FeedOptions options = default);
abstract member ReadUserDefinedFunctionFeedAsync : string * Microsoft.Azure.Documents.Client.FeedOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.FeedResponse<Microsoft.Azure.Documents.UserDefinedFunction>>
Public Function ReadUserDefinedFunctionFeedAsync (userDefinedFunctionsLink As String, Optional options As FeedOptions = Nothing) As Task(Of FeedResponse(Of UserDefinedFunction))

パラメーター

userDefinedFunctionsLink
String

読み取るリソースの SelfLink。 例: /dbs/db_rid/colls/col_rid/udfs/

options
FeedOptions

(省略可能)要求の要求オプション。

戻り値

System.Threading.Tasks読み取りリソース レコードをResourceResponse<TResource>含む をUserDefinedFunctionラップする を含む 。

例外

が設定されていない場合 userDefinedFunctionsLink

この例外により、さまざまな種類のエラーがカプセル化される可能性があります。 特定のエラーを特定するには、常に StatusCode プロパティを参照してください。 ドキュメントの作成時に取得できる一般的なコードは次のとおりです。

StatusCode例外の理由
404NotFound - これは、読み取ろうとしたリソース フィードが存在しなかったことを意味します。 親の取り除きが正しいことを確認します。
429TooManyRequests - つまり、1 秒あたりの要求ユニット数を超えています。 DocumentClientException.RetryAfter 値を調べ、この操作を再試行するまでの待機時間を確認します。

int count = 0;
string continuation = string.Empty;
do
{
    // Read the feed 10 items at a time until there are no more items to read
    FeedResponse<UserDefinedFunction> response = await client.ReadUserDefinedFunctionFeedAsync("/dbs/db_rid/colls/col_rid/udfs/",
                                                    new FeedOptions
                                                    {
                                                        MaxItemCount = 10,
                                                        RequestContinuation = continuation
                                                    });

    // Append the item count
    count += response.Count;

    // Get the continuation so that we know when to stop.
     continuation = response.ResponseContinuation;
} while (!string.IsNullOrEmpty(continuation));

こちらもご覧ください

適用対象