次の方法で共有


InsightAttachments.DeleteAsync メソッド

定義

指定した分析情報リソースを削除します。

public virtual System.Threading.Tasks.Task<Azure.Response> DeleteAsync (string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context = default);
abstract member DeleteAsync : string * string * string * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteAsync : string * string * string * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteAsync (partyId As String, modelId As String, resourceType As String, resourceId As String, insightAttachmentId As String, Optional context As RequestContext = Nothing) As Task(Of Response)

パラメーター

partyId
String

関連付けられたパーティの ID。

modelId
String

関連付けられたモデルの ID。 "BiomassModelId"、"SensorPlacementModelId"、"SoilMoistureModelId"、または任意のソリューション ID のいずれかを指定できます。

resourceType
String

レコードに関連付けられているリソースの種類。

resourceId
String

関連付けられているリソースの ID。

insightAttachmentId
String

分析情報添付ファイル リソースの ID。

context
RequestContext

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

戻り値

サービスから返された応答。

例外

partyIdmodelIdresourceTyperesourceId または insightAttachmentId が null です。

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

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

このサンプルでは、必要なパラメーターを使用して DeleteAsync を呼び出す方法を示します。

var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(<2022-11-01-preview>);

Response response = await client.DeleteAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>");
Console.WriteLine(response.Status);

適用対象