getConnection method

Future<GetConnectionOutput> getConnection({
  1. required String domainIdentifier,
  2. required String identifier,
  3. bool? withSecret,
})

Gets a connection. In Amazon DataZone, a connection enables you to connect your resources (domains, projects, and environments) to external resources and services.

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

Parameter domainIdentifier : The ID of the domain where we get the connection.

Parameter identifier : The connection ID.

Parameter withSecret : Specifies whether a connection has a secret.

Implementation

Future<GetConnectionOutput> getConnection({
  required String domainIdentifier,
  required String identifier,
  bool? withSecret,
}) async {
  final $query = <String, List<String>>{
    if (withSecret != null) 'withSecret': [withSecret.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/connections/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetConnectionOutput.fromJson(response);
}