getCanary method

Future<GetCanaryResponse> getCanary({
  1. required String name,
  2. String? dryRunId,
})

Retrieves complete information about one canary. You must specify the name of the canary that you want. To get a list of canaries and their names, use DescribeCanaries.

May throw InternalServerException. May throw ValidationException.

Parameter name : The name of the canary that you want details for.

Parameter dryRunId : The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run.

Implementation

Future<GetCanaryResponse> getCanary({
  required String name,
  String? dryRunId,
}) async {
  final $query = <String, List<String>>{
    if (dryRunId != null) 'dryRunId': [dryRunId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/canary/${Uri.encodeComponent(name)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetCanaryResponse.fromJson(response);
}