Parameters
Config: the key parameters that are used to make a request for the OpenSearch API.
endpoint: the endpoint of the OpenSearch API. The value does not contain the http:// or https:// prefix.
protocol: the access network protocol. Valid values: HTTP and HTTPS.
type: the authentication method. Valid values: access_key and sts. You can implement authentication by using an Alibaba Cloud account, a RAM user, or STS.
securityToken: the STS token that is used for authentication. This parameter is required if you set the type parameter to sts. You can call the AssumeRole operation of Alibaba Cloud RAM to obtain an STS token.
accessKeyId/accessKeySecret: the AccessKey pair that is used to authenticate OpenSearch API requests. You can click the following link to go to the AccessKey Management page and create an AccessKey pair,see Create an AccessKey pair
userAgent: the user authentication information. In most cases, this parameter is not required.
Sample code
The following sample code shows how to configure a Config class in C#:
using System;
using System.Collections.Generic;
using System.IO;
using Tea;
public class Config : TeaModel
{
[NameInMap("endpoint")]
[Validation(Required = false)]
public string Endpoint { get; set; }
[NameInMap("protocol")]
[Validation(Required = false)]
public string Protocol { get; set; }
[NameInMap("type")]
[Validation(Required = false)]
public string Type { get; set; }
[NameInMap("securityToken")]
[Validation(Required = false)]
public string SecurityToken { get; set; }
[NameInMap("accessKeyId")]
[Validation(Required = false)]
public string AccessKeyId { get; set; }
[NameInMap("accessKeySecret")]
[Validation(Required = false)]
public string AccessKeySecret { get; set; }
[NameInMap("userAgent")]
[Validation(Required = false)]
public string UserAgent { get; set; }
}