Class AwsSigV4HttpConnection
An IConnection implementation that performs AWS SigV4 request signing, for performing authentication with Amazon Managed OpenSearch.
Inherited Members
Namespace: OpenSearch.Net.Auth.AwsSigV4
Assembly: OpenSearch.Net.Auth.AwsSigV4.dll
Syntax
public class AwsSigV4HttpConnection : HttpConnection, IConnection, IDisposable
Constructors
| Edit this page View SourceAwsSigV4HttpConnection(RegionEndpoint, string, IDateTimeProvider)
Construct a new connection configured with a specified region and using credentials discovered from the environment.
Declaration
public AwsSigV4HttpConnection(RegionEndpoint region, string service = "es", IDateTimeProvider dateTimeProvider = null)
Parameters
Type | Name | Description |
---|---|---|
RegionEndpoint | region | The region to use when signing. |
string | service | The service code to use when signing, defaults to the service code for the Amazon OpenSearch Service ( |
IDateTimeProvider | dateTimeProvider | The date time proved to use, safe to pass null to use the default |
See Also
| Edit this page View SourceAwsSigV4HttpConnection(AWSCredentials, RegionEndpoint, string, IDateTimeProvider)
Construct a new connection configured with the given credentials and region.
Declaration
public AwsSigV4HttpConnection(AWSCredentials credentials, RegionEndpoint region, string service = "es", IDateTimeProvider dateTimeProvider = null)
Parameters
Type | Name | Description |
---|---|---|
AWSCredentials | credentials | The credentials to use when signing, or null to have them discovered automatically by the AWS SDK. |
RegionEndpoint | region | The region to use when signing, or null to have it discovered automatically by the AWS SDK. |
string | service | The service code to use when signing, defaults to the service code for the Amazon OpenSearch Service ( |
IDateTimeProvider | dateTimeProvider | The date time proved to use, safe to pass null to use the default |
Remarks
The same logic as the AWS SDK for .NET is used to automatically discover the credentials and region to use if not provided explicitly.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if region is null and is unable to be automatically discovered by the AWS SDK. |
AwsSigV4HttpConnection(AWSCredentials, string, IDateTimeProvider)
Construct a new connection configured with the specified credentials and using the region discovered from the environment.
Declaration
public AwsSigV4HttpConnection(AWSCredentials credentials, string service = "es", IDateTimeProvider dateTimeProvider = null)
Parameters
Type | Name | Description |
---|---|---|
AWSCredentials | credentials | The credentials to use when signing. |
string | service | The service code to use when signing, defaults to the service code for the Amazon OpenSearch Service ( |
IDateTimeProvider | dateTimeProvider | The date time proved to use, safe to pass null to use the default |
See Also
| Edit this page View SourceAwsSigV4HttpConnection(string, IDateTimeProvider)
Construct a new connection discovering both the credentials and region from the environment.
Declaration
public AwsSigV4HttpConnection(string service = "es", IDateTimeProvider dateTimeProvider = null)
Parameters
Type | Name | Description |
---|---|---|
string | service | The service code to use when signing, defaults to the service code for the Amazon OpenSearch Service ( |
IDateTimeProvider | dateTimeProvider | The date time proved to use, safe to pass null to use the default |
See Also
Fields
| Edit this page View SourceOpenSearchServerlessService
Declaration
public const string OpenSearchServerlessService = "aoss"
Field Value
Type | Description |
---|---|
string |
OpenSearchService
Declaration
public const string OpenSearchService = "es"
Field Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceCreateHttpClientHandler(RequestData)
Declaration
protected override HttpMessageHandler CreateHttpClientHandler(RequestData requestData)
Parameters
Type | Name | Description |
---|---|---|
RequestData | requestData |
Returns
Type | Description |
---|---|
HttpMessageHandler |
Overrides
| Edit this page View SourceInnerCreateHttpClientHandler(RequestData)
Declaration
protected virtual HttpMessageHandler InnerCreateHttpClientHandler(RequestData requestData)
Parameters
Type | Name | Description |
---|---|---|
RequestData | requestData |
Returns
Type | Description |
---|---|
HttpMessageHandler |