InsightAttachments.GetInsightAttachment Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft eine angegebene Erkenntnisressource unter einer bestimmten Partei ab.
public virtual Azure.Response GetInsightAttachment (string partyId, string modelId, string resourceType, string resourceId, string insightAttachmentId, Azure.RequestContext context = default);
abstract member GetInsightAttachment : string * string * string * string * string * Azure.RequestContext -> Azure.Response
override this.GetInsightAttachment : string * string * string * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetInsightAttachment (partyId As String, modelId As String, resourceType As String, resourceId As String, insightAttachmentId As String, Optional context As RequestContext = Nothing) As Response
Parameter
- partyId
- String
ID der zugeordneten Partei.
- modelId
- String
ID des zugeordneten Modells. Dies kann entweder "BiomassModelId", "SensorPlacementModelId", "SoilMoistureModelId" oder eine beliebige Lösungs-ID sein.
- resourceType
- String
Ressourcentyp, der dem Datensatz zugeordnet ist.
- resourceId
- String
ID der zugeordneten Ressource.
- insightAttachmentId
- String
ID der Insight-Anlageressource.
- context
- RequestContext
Der Anforderungskontext, der das Standardverhalten der Clientpipeline pro Aufruf außer Kraft setzen kann.
Gibt zurück
Die vom Dienst zurückgegebene Antwort. Details zum Antworttextschema finden Sie unten im Abschnitt Hinweise.
Ausnahmen
partyId
, modelId
, resourceType
resourceId
oder insightAttachmentId
ist NULL.
partyId
, modelId
, resourceType
resourceId
oder insightAttachmentId
ist eine leere Zeichenfolge, und es wurde erwartet, dass sie nicht leer ist.
Der Dienst hat einen nicht erfolgreichen status Code zurückgegeben.
Beispiele
In diesem Beispiel wird gezeigt, wie GetInsightAttachment mit den erforderlichen Parametern aufgerufen und das Ergebnis analysiert wird.
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(<2022-11-01-preview>);
Response response = client.GetInsightAttachment("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", "<insightAttachmentId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("insightId").ToString());
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("resourceType").ToString());
Console.WriteLine(result.GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("originalFileName").ToString());
Console.WriteLine(result.GetProperty("partyId").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("modifiedDateTime").ToString());
Console.WriteLine(result.GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
Hinweise
Im Folgenden finden Sie das JSON-Schema für die Antwortnutzlast.
Antworttext:
Schema für InsightAttachment
:
{
insightId: string, # Required. InsightID for this InsightAttachment.
modelId: string, # Optional. ModelID for this InsightAttachment.
resourceType: "Party" | "Farm" | "Field" | "SeasonalField" | "Boundary", # Optional. Associated Resource type for this attachment.
resourceId: string, # Optional. Associated Resource id for this attachment.
originalFileName: string, # Optional. Original File Name for this attachment.
partyId: string, # Optional. PartyId id for this attachment.
id: string, # Optional. Unique id.
status: string, # Optional. Status of the resource.
createdDateTime: string (ISO 8601 Format), # Optional. Date when resource was created.
modifiedDateTime: string (ISO 8601 Format), # Optional. Date when resource was last modified.
source: string, # Optional. Source of the resource.
name: string, # Optional. Name to identify resource.
description: string, # Optional. Textual description of resource.
createdBy: string, # Optional. Created by user/tenant id.
modifiedBy: string, # Optional. Modified by user/tenant id.
eTag: string, # Optional. The ETag value to implement optimistic concurrency.
}
Gilt für:
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für