Language

SearchIndexClient.UpdateKnowledgeSourceFile Method

Definition

Overloads

Name Description
UpdateKnowledgeSourceFile(String, String, UpdateKnowledgeSourceFileRequest, CancellationToken)

Updates an existing file in a File knowledge source in place, replacing its indexed content. Uses multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

UpdateKnowledgeSourceFile(String, String, RequestContent, String, RequestContext)

[Protocol Method] Updates an existing file in a File knowledge source in place, replacing its indexed content. Uses multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

UpdateKnowledgeSourceFile(String, String, UpdateKnowledgeSourceFileRequest, CancellationToken)

Source:
SearchIndexClient.cs

Updates an existing file in a File knowledge source in place, replacing its indexed content. Uses multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile> UpdateKnowledgeSourceFile(string fileId, string sourceName, Azure.Search.Documents.Indexes.Models.UpdateKnowledgeSourceFileRequest body, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateKnowledgeSourceFile : string * string * Azure.Search.Documents.Indexes.Models.UpdateKnowledgeSourceFileRequest * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile>
override this.UpdateKnowledgeSourceFile : string * string * Azure.Search.Documents.Indexes.Models.UpdateKnowledgeSourceFileRequest * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile>
Public Overridable Function UpdateKnowledgeSourceFile (fileId As String, sourceName As String, body As UpdateKnowledgeSourceFileRequest, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KnowledgeSourceFile)

Parameters

fileId
String

The unique identifier of the file to update.

sourceName
String

The name of the knowledge source.

body
UpdateKnowledgeSourceFileRequest

The multipart/form-data body containing the metadata and content parts.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

fileId, sourceName or body is null.

fileId or sourceName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

UpdateKnowledgeSourceFile(String, String, RequestContent, String, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Updates an existing file in a File knowledge source in place, replacing its indexed content. Uses multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response UpdateKnowledgeSourceFile(string fileId, string sourceName, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = default);
abstract member UpdateKnowledgeSourceFile : string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
override this.UpdateKnowledgeSourceFile : string * string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
Public Overridable Function UpdateKnowledgeSourceFile (fileId As String, sourceName As String, content As RequestContent, contentType As String, Optional context As RequestContext = Nothing) As Response

Parameters

fileId
String

The unique identifier of the file to update.

sourceName
String

The name of the knowledge source.

content
RequestContent

The content to send as the body of the request.

contentType
String

The contentType to use which has the multipart/form-data boundary.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

fileId, sourceName, content or contentType is null.

fileId, sourceName or contentType is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to