WebApiSkill Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. SearchIndexerSkill - com.
azure. search. documents. indexes. models. WebApiSkill
- com.
- com.
public final class WebApiSkill
extends SearchIndexerSkill
A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code.
Constructor Summary
| Constructor | Description |
|---|---|
| WebApiSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String uri) |
Creates an instance of Web |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Web |
fromJson(JsonReader jsonReader)
Reads an instance of Web |
|
Search |
getAuthIdentity()
Get the auth |
| String |
getAuthResourceId()
Get the auth |
| Integer |
getBatchSize()
Get the batch |
| Integer |
getDegreeOfParallelism()
Get the degree |
| Map<String,String> |
getHttpHeaders()
Get the http |
| String |
getHttpMethod()
Get the http |
| String |
getOdataType()
Get the odata |
| Duration |
getTimeout()
Get the timeout property: The desired timeout for the request. |
| String |
getUri()
Get the uri property: The url for the Web API. |
|
Web |
setAuthIdentity(SearchIndexerDataIdentity authIdentity)
Set the auth |
|
Web |
setAuthResourceId(String authResourceId)
Set the auth |
|
Web |
setBatchSize(Integer batchSize)
Set the batch |
|
Web |
setContext(String context)
Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). |
|
Web |
setDegreeOfParallelism(Integer degreeOfParallelism)
Set the degree |
|
Web |
setDescription(String description)
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill. |
|
Web |
setHttpHeaders(Map<String,String> httpHeaders)
Set the http |
|
Web |
setHttpMethod(String httpMethod)
Set the http |
|
Web |
setName(String name)
Set the name property: The name of the skill which uniquely identifies it within the skillset. |
|
Web |
setTimeout(Duration timeout)
Set the timeout property: The desired timeout for the request. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from SearchIndexerSkill
Methods inherited from java.lang.Object
Constructor Details
WebApiSkill
public WebApiSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String uri)
Creates an instance of WebApiSkill class.
Parameters:
Method Details
fromJson
public static WebApiSkill fromJson(JsonReader jsonReader)
Reads an instance of WebApiSkill from the JsonReader.
Parameters:
Returns:
Throws:
getAuthIdentity
public SearchIndexerDataIdentity getAuthIdentity()
Get the authIdentity property: The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared.
Returns:
getAuthResourceId
public String getAuthResourceId()
Get the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.
Returns:
getBatchSize
public Integer getBatchSize()
Get the batchSize property: The desired batch size which indicates number of documents.
Returns:
getDegreeOfParallelism
public Integer getDegreeOfParallelism()
Get the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.
Returns:
getHttpHeaders
public Map<String,String> getHttpHeaders()
Get the httpHeaders property: The headers required to make the http request.
Returns:
getHttpMethod
public String getHttpMethod()
Get the httpMethod property: The method for the http request.
Returns:
getOdataType
public String getOdataType()
Get the odataType property: A URI fragment specifying the type of skill.
Overrides:
WebApiSkill.getOdataType()Returns:
getTimeout
public Duration getTimeout()
Get the timeout property: The desired timeout for the request. Default is 30 seconds.
Returns:
getUri
public String getUri()
Get the uri property: The url for the Web API.
Returns:
setAuthIdentity
public WebApiSkill setAuthIdentity(SearchIndexerDataIdentity authIdentity)
Set the authIdentity property: The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared.
Parameters:
Returns:
setAuthResourceId
public WebApiSkill setAuthResourceId(String authResourceId)
Set the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.
Parameters:
Returns:
setBatchSize
public WebApiSkill setBatchSize(Integer batchSize)
Set the batchSize property: The desired batch size which indicates number of documents.
Parameters:
Returns:
setContext
public WebApiSkill setContext(String context)
Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.
Overrides:
WebApiSkill.setContext(String context)Parameters:
setDegreeOfParallelism
public WebApiSkill setDegreeOfParallelism(Integer degreeOfParallelism)
Set the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.
Parameters:
Returns:
setDescription
public WebApiSkill setDescription(String description)
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.
Overrides:
WebApiSkill.setDescription(String description)Parameters:
setHttpHeaders
public WebApiSkill setHttpHeaders(Map<String,String> httpHeaders)
Set the httpHeaders property: The headers required to make the http request.
Parameters:
Returns:
setHttpMethod
public WebApiSkill setHttpMethod(String httpMethod)
Set the httpMethod property: The method for the http request.
Parameters:
Returns:
setName
public WebApiSkill setName(String name)
Set the name property: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'.
Overrides:
WebApiSkill.setName(String name)Parameters:
setTimeout
public WebApiSkill setTimeout(Duration timeout)
Set the timeout property: The desired timeout for the request. Default is 30 seconds.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
WebApiSkill.toJson(JsonWriter jsonWriter)Parameters:
Throws: