describeCanaries method
This operation returns a list of the canaries in your account, along with full details about each canary.
This operation supports resource-level authorization using an IAM policy
and the Names parameter. If you specify the
Names parameter, the operation is successful only if you have
authorization to view all the canaries that you specify in your request.
If you do not have permission to view any of the canaries, the request
fails with a 403 response.
You are required to use the Names parameter if you are logged
on to a user or role that has an IAM policy that restricts which canaries
that you are allowed to view. For more information, see
Limiting a user to viewing specific canaries.
May throw InternalServerException.
May throw ValidationException.
Parameter maxResults :
Specify this parameter to limit how many canaries are returned each time
you use the DescribeCanaries operation. If you omit this
parameter, the default of 20 is used.
Parameter names :
Use this parameter to return only canaries that match the names that you
specify here. You can specify as many as five canary names.
If you specify this parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.
You are required to use this parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.
Parameter nextToken :
A token that indicates that there is more data available. You can use this
token in a subsequent operation to retrieve the next set of results.
Implementation
Future<DescribeCanariesResponse> describeCanaries({
int? maxResults,
List<String>? names,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
20,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (names != null) 'Names': names,
if (nextToken != null) 'NextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/canaries',
exceptionFnMap: _exceptionFns,
);
return DescribeCanariesResponse.fromJson(response);
}