getConnections method
- String? catalogId,
- GetConnectionsFilter? filter,
- bool? hidePassword,
- int? maxResults,
- String? nextToken,
Retrieves a list of connection definitions from the Data Catalog.
May throw EntityNotFoundException. May throw OperationTimeoutException. May throw InvalidInputException. May throw GlueEncryptionException.
Parameter catalogId
:
The ID of the Data Catalog in which the connections reside. If none is
provided, the AWS account ID is used by default.
Parameter filter
:
A filter that controls which connections are returned.
Parameter hidePassword
:
Allows you to retrieve the connection metadata without returning the
password. For instance, the AWS Glue console uses this flag to retrieve
the connection, and does not display the password. Set this parameter when
the caller might not have permission to use the AWS KMS key to decrypt the
password, but it does have permission to access the rest of the connection
properties.
Parameter maxResults
:
The maximum number of connections to return in one response.
Parameter nextToken
:
A continuation token, if this is a continuation call.
Implementation
Future<GetConnectionsResponse> getConnections({
String? catalogId,
GetConnectionsFilter? filter,
bool? hidePassword,
int? maxResults,
String? nextToken,
}) async {
_s.validateStringLength(
'catalogId',
catalogId,
1,
255,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.GetConnections'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (catalogId != null) 'CatalogId': catalogId,
if (filter != null) 'Filter': filter,
if (hidePassword != null) 'HidePassword': hidePassword,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return GetConnectionsResponse.fromJson(jsonResponse.body);
}