getConnection method

Future<GetConnectionResponse> getConnection({
  1. required String catalog,
  2. required String identifier,
})

Retrieves detailed information about a specific connection between partners.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : The catalog identifier where the connection exists.

Parameter identifier : The unique identifier of the connection to retrieve.

Implementation

Future<GetConnectionResponse> getConnection({
  required String catalog,
  required String identifier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralAccount.GetConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      'Identifier': identifier,
    },
  );

  return GetConnectionResponse.fromJson(jsonResponse.body);
}