listEventSubscriptions method
Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. For more information, see SubscribeToEvent and UnsubscribeFromEvent.
May throw InternalException. May throw InvalidInputException. May throw AccessDeniedException. May throw NoSuchEntityException.
Parameter maxResults
:
You can use this parameter to indicate the maximum number of items you
want in the response. The default value is 10. The maximum value is 500.
Parameter nextToken
:
You can use this parameter when paginating results. Set the value of this
parameter to null on your first call to the ListEventSubscriptions
action. Subsequent calls to the action fill nextToken in the
request with the value of NextToken from the previous response to
continue listing data.
Parameter resourceArn
:
The ARN of the assessment template for which you want to list the existing
event subscriptions.
Implementation
Future<ListEventSubscriptionsResponse> listEventSubscriptions({
int? maxResults,
String? nextToken,
String? resourceArn,
}) async {
_s.validateStringLength(
'nextToken',
nextToken,
1,
300,
);
_s.validateStringLength(
'resourceArn',
resourceArn,
1,
300,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.ListEventSubscriptions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (resourceArn != null) 'resourceArn': resourceArn,
},
);
return ListEventSubscriptionsResponse.fromJson(jsonResponse.body);
}