Class PutScriptDescriptor
Descriptor for PutScript
https://opensearch.org/docs/latest/api-reference/script-apis/create-stored-script/
Inheritance
PutScriptDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class PutScriptDescriptor : RequestDescriptorBase<PutScriptDescriptor, PutScriptRequestParameters, IPutScriptRequest>, IDescriptor, IPutScriptRequest, IRequest<PutScriptRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
PutScriptDescriptor()
Used for serialization purposes, making sure we have a parameterless constructor
Declaration
protected PutScriptDescriptor()
|
Edit this page
View Source
PutScriptDescriptor(Id)
Declaration
public PutScriptDescriptor(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
this parameter is required
|
|
Edit this page
View Source
PutScriptDescriptor(Id, Name)
Declaration
public PutScriptDescriptor(Id id, Name context)
Parameters
Type |
Name |
Description |
Id |
id |
this parameter is required
|
Name |
context |
Optional, accepts null
|
Methods
|
Edit this page
View Source
ClusterManagerTimeout(Time)
Operation timeout for connection to cluster-manager node.
Declaration
public PutScriptDescriptor ClusterManagerTimeout(Time clustermanagertimeout)
Parameters
Type |
Name |
Description |
Time |
clustermanagertimeout |
|
Returns
|
Edit this page
View Source
Context(Name)
Context in which the script or search template should run. To prevent errors, the API immediately compiles the script or template in this context.
Declaration
public PutScriptDescriptor Context(Name context)
Parameters
Type |
Name |
Description |
Name |
context |
|
Returns
|
Edit this page
View Source
LuceneExpression(string)
A Lucene expression language script
Declaration
public PutScriptDescriptor LuceneExpression(string source)
Parameters
Type |
Name |
Description |
string |
source |
|
Returns
|
Edit this page
View Source
MasterTimeout(Time)
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Declaration
[Obsolete("Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead.")]
public PutScriptDescriptor MasterTimeout(Time mastertimeout)
Parameters
Type |
Name |
Description |
Time |
mastertimeout |
|
Returns
|
Edit this page
View Source
Mustache(string)
A Mustache template language script
Declaration
public PutScriptDescriptor Mustache(string source)
Parameters
Type |
Name |
Description |
string |
source |
|
Returns
|
Edit this page
View Source
Painless(string)
A Painless language script
Declaration
public PutScriptDescriptor Painless(string source)
Parameters
Type |
Name |
Description |
string |
source |
|
Returns
|
Edit this page
View Source
Script(Func<StoredScriptDescriptor, IStoredScript>)
Declaration
public PutScriptDescriptor Script(Func<StoredScriptDescriptor, IStoredScript> selector)
Parameters
Returns
|
Edit this page
View Source
Timeout(Time)
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Declaration
public PutScriptDescriptor Timeout(Time timeout)
Parameters
Type |
Name |
Description |
Time |
timeout |
|
Returns
Implements
Extension Methods