createOutboundConnection method
Future<CreateOutboundConnectionResponse>
createOutboundConnection({
- required String connectionAlias,
- required DomainInformationContainer localDomainInfo,
- required DomainInformationContainer remoteDomainInfo,
- ConnectionMode? connectionMode,
- ConnectionProperties? connectionProperties,
Creates a new cross-cluster search connection from a source Amazon OpenSearch Service domain to a destination domain. For more information, see Cross-cluster search for Amazon OpenSearch Service.
May throw DisabledOperationException.
May throw InternalException.
May throw LimitExceededException.
May throw ResourceAlreadyExistsException.
Parameter connectionAlias :
Name of the connection.
Parameter localDomainInfo :
Name and Region of the source (local) domain.
Parameter remoteDomainInfo :
Name and Region of the destination (remote) domain.
Parameter connectionMode :
The connection mode.
Parameter connectionProperties :
The ConnectionProperties for the outbound connection.
Implementation
Future<CreateOutboundConnectionResponse> createOutboundConnection({
required String connectionAlias,
required DomainInformationContainer localDomainInfo,
required DomainInformationContainer remoteDomainInfo,
ConnectionMode? connectionMode,
ConnectionProperties? connectionProperties,
}) async {
final $payload = <String, dynamic>{
'ConnectionAlias': connectionAlias,
'LocalDomainInfo': localDomainInfo,
'RemoteDomainInfo': remoteDomainInfo,
if (connectionMode != null) 'ConnectionMode': connectionMode.value,
if (connectionProperties != null)
'ConnectionProperties': connectionProperties,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2021-01-01/opensearch/cc/outboundConnection',
exceptionFnMap: _exceptionFns,
);
return CreateOutboundConnectionResponse.fromJson(response);
}