listPartnerEventSourceAccounts method
An SaaS partner can use this operation to display the AWS account ID that a particular partner event source name is associated with. This operation is not used by AWS customers.
May throw ResourceNotFoundException. May throw InternalException. May throw OperationDisabledException.
Parameter eventSourceName
:
The name of the partner event source to display account information about.
Parameter limit
:
Specifying this limits the number of results returned by this operation.
The operation also returns a NextToken which you can use in a subsequent
operation to retrieve the next set of results.
Parameter nextToken
:
The token returned by a previous call to this operation. Specifying this
retrieves the next set of results.
Implementation
Future<ListPartnerEventSourceAccountsResponse>
listPartnerEventSourceAccounts({
required String eventSourceName,
int? limit,
String? nextToken,
}) async {
ArgumentError.checkNotNull(eventSourceName, 'eventSourceName');
_s.validateStringLength(
'eventSourceName',
eventSourceName,
1,
256,
isRequired: true,
);
_s.validateNumRange(
'limit',
limit,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.ListPartnerEventSourceAccounts'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EventSourceName': eventSourceName,
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListPartnerEventSourceAccountsResponse.fromJson(jsonResponse.body);
}