HttpPipeline.CreateClientRequestIdScope(String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
すべての送信要求で指定された を使用するスコープを作成します。
public static IDisposable CreateClientRequestIdScope(string? clientRequestId);
static member CreateClientRequestIdScope : string -> IDisposable
Public Shared Function CreateClientRequestIdScope (clientRequestId As String) As IDisposable
パラメーター
- clientRequestId
- String
要求と共に送信されるクライアント要求 ID 値。
戻り値
IDisposableクライアント要求 ID を送信しなくなったときに破棄する必要があるインスタンス。
例
使用例:
var secretClient = new SecretClient(new Uri("http://example.com"), new DefaultAzureCredential());
using (HttpPipeline.CreateClientRequestIdScope("<custom-client-request-id>"))
{
// The HTTP request resulting from the client call would have x-ms-client-request-id value set to <custom-client-request-id>
secretClient.GetSecret("<secret-name>");
}
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for .NET