InsightAttachments.Download メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定された入力 filePath の応答として insight-attachment をダウンロードして返します。
public virtual Azure.Response Download (string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context = default);
abstract member Download : string * string * string * string * string * Azure.RequestContext -> Azure.Response
override this.Download : string * string * string * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function Download (partyId As String, modelId As String, resourceType As String, resourceId As String, insightAttachmentId As String, Optional context As RequestContext = Nothing) As Response
パラメーター
- partyId
- String
関連付けられたパーティの ID。
- modelId
- String
関連付けられたモデルの ID。 "BiomassModelId"、"SensorPlacementModelId"、"SoilMoistureModelId"、または任意のソリューション ID のいずれかを指定できます。
- resourceType
- String
レコードに関連付けられているリソースの種類。
- resourceId
- String
関連付けられているリソースの ID。
- insightAttachmentId
- String
分析情報添付ファイル リソースの ID。
- context
- RequestContext
要求コンテキスト。これは、呼び出しごとにクライアント パイプラインの既定の動作をオーバーライドできます。
戻り値
サービスから返された応答。
例外
partyId
、 modelId
、 resourceType
、 resourceId
または insightAttachmentId
が null です。
partyId
、 modelId
、 resourceType
、 resourceId
または insightAttachmentId
は空の文字列であり、空でないと想定されていました。
サービスから成功以外の状態コードが返されました。
例
このサンプルでは、必要なパラメーターを使用して Download を呼び出し、結果を解析する方法を示します。
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(<2022-11-01-preview>);
Response response = client.Download("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>");
if (response.ContentStream != null)
{
using(Stream outFileStream = File.OpenWrite("<filePath>")
{
response.ContentStream.CopyTo(outFileStream);
}
}
適用対象
Azure SDK for .NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示