createOutboundCrossClusterSearchConnection method

Future<CreateOutboundCrossClusterSearchConnectionResponse> createOutboundCrossClusterSearchConnection({
  1. required String connectionAlias,
  2. required DomainInformation destinationDomainInfo,
  3. required DomainInformation sourceDomainInfo,
})

Creates a new cross-cluster search connection from a source domain to a destination domain.

May throw LimitExceededException. May throw InternalException. May throw ResourceAlreadyExistsException. May throw DisabledOperationException.

Parameter connectionAlias : Specifies the connection alias that will be used by the customer for this connection.

Parameter destinationDomainInfo : Specifies the DomainInformation for the destination Elasticsearch domain.

Parameter sourceDomainInfo : Specifies the DomainInformation for the source Elasticsearch domain.

Implementation

Future<CreateOutboundCrossClusterSearchConnectionResponse>
    createOutboundCrossClusterSearchConnection({
  required String connectionAlias,
  required DomainInformation destinationDomainInfo,
  required DomainInformation sourceDomainInfo,
}) async {
  ArgumentError.checkNotNull(connectionAlias, 'connectionAlias');
  _s.validateStringLength(
    'connectionAlias',
    connectionAlias,
    0,
    20,
    isRequired: true,
  );
  ArgumentError.checkNotNull(destinationDomainInfo, 'destinationDomainInfo');
  ArgumentError.checkNotNull(sourceDomainInfo, 'sourceDomainInfo');
  final $payload = <String, dynamic>{
    'ConnectionAlias': connectionAlias,
    'DestinationDomainInfo': destinationDomainInfo,
    'SourceDomainInfo': sourceDomainInfo,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2015-01-01/es/ccs/outboundConnection',
    exceptionFnMap: _exceptionFns,
  );
  return CreateOutboundCrossClusterSearchConnectionResponse.fromJson(
      response);
}