listSourceAssociations method
Lists source associations for resource shares. Source associations control which sources can be used with service principals in resource shares. This operation provides visibility into source associations for resource share owners.
You can filter the results by resource share Amazon Resource Name (ARN), source ID, source type, or association status. We recommend using pagination to ensure that the operation returns quickly and successfully.
May throw InvalidNextTokenException.
May throw InvalidParameterException.
May throw MalformedArnException.
May throw ServerInternalException.
May throw ServiceUnavailableException.
May throw UnknownResourceException.
Parameter associationStatus :
The status of the source associations that you want to retrieve.
Parameter maxResults :
The maximum number of results to return in a single call. To retrieve the
remaining results, make another call with the returned
nextToken value.
Parameter nextToken :
The pagination token that indicates the next set of results to retrieve.
Parameter resourceShareArns :
The Amazon Resource Names (ARNs) of the resource shares for which you want
to retrieve source associations.
Parameter sourceId :
The identifier of the source for which you want to retrieve associations.
This can be an account ID, Amazon Resource Name (ARN), organization ID, or
organization path.
Parameter sourceType :
The type of source for which you want to retrieve associations.
Implementation
Future<ListSourceAssociationsResponse> listSourceAssociations({
ResourceShareAssociationStatus? associationStatus,
int? maxResults,
String? nextToken,
List<String>? resourceShareArns,
String? sourceId,
String? sourceType,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final $payload = <String, dynamic>{
if (associationStatus != null)
'associationStatus': associationStatus.value,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (resourceShareArns != null) 'resourceShareArns': resourceShareArns,
if (sourceId != null) 'sourceId': sourceId,
if (sourceType != null) 'sourceType': sourceType,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/listsourceassociations',
exceptionFnMap: _exceptionFns,
);
return ListSourceAssociationsResponse.fromJson(response);
}