ImageModeration.MatchFileInputWithHttpMessagesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.
Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.
public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>> MatchFileInputWithHttpMessagesAsync (System.IO.Stream imageStream, string listId = default, bool? cacheImage = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member MatchFileInputWithHttpMessagesAsync : System.IO.Stream * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>>
override this.MatchFileInputWithHttpMessagesAsync : System.IO.Stream * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>>
Public Function MatchFileInputWithHttpMessagesAsync (imageStream As Stream, Optional listId As String = Nothing, Optional cacheImage As Nullable(Of Boolean) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of MatchResponse))
Parameters
- imageStream
- Stream
The image file.
- listId
- String
The list Id.
Whether to retain the submitted image for future use; defaults to false if omitted.
- customHeaders
- Dictionary<String,List<String>>
Headers that will be added to request.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Implements
Exceptions
Thrown when the operation returned an invalid status code
Thrown when unable to deserialize the response
Thrown when a required parameter is null
Thrown when a required parameter is null
Applies to
Azure SDK for .NET