listConnections method
Lists connections. 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 ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The ID of the domain where you want to list connections.
Parameter environmentIdentifier :
The ID of the environment where you want to list connections.
Parameter maxResults :
The maximum number of connections to return in a single call to
ListConnections. When the number of connections to be listed is greater
than the value of MaxResults, the response contains a NextToken value that
you can use in a subsequent call to ListConnections to list the next set
of connections.
Parameter name :
The name of the connection.
Parameter nextToken :
When the number of connections is greater than the default value for the
MaxResults parameter, or if you explicitly specify a value for MaxResults
that is less than the number of connections, the response includes a
pagination token named NextToken. You can specify this NextToken value in
a subsequent call to ListConnections to list the next set of connections.
Parameter projectIdentifier :
The ID of the project where you want to list connections.
Parameter scope :
The scope of the connection.
Parameter sortBy :
Specifies how you want to sort the listed connections.
Parameter sortOrder :
Specifies the sort order for the listed connections.
Parameter type :
The type of connection.
Implementation
Future<ListConnectionsOutput> listConnections({
required String domainIdentifier,
String? environmentIdentifier,
int? maxResults,
String? name,
String? nextToken,
String? projectIdentifier,
ConnectionScope? scope,
SortFieldConnection? sortBy,
SortOrder? sortOrder,
ConnectionType? type,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (environmentIdentifier != null)
'environmentIdentifier': [environmentIdentifier],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (name != null) 'name': [name],
if (nextToken != null) 'nextToken': [nextToken],
if (projectIdentifier != null) 'projectIdentifier': [projectIdentifier],
if (scope != null) 'scope': [scope.value],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
if (type != null) 'type': [type.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/connections',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListConnectionsOutput.fromJson(response);
}