listSafetyRules method

Future<ListSafetyRulesResponse> listSafetyRules({
  1. required String controlPanelArn,
  2. int? maxResults,
  3. String? nextToken,
})

List the safety rules (the assertion rules and gating rules) that you've defined for the routing controls in a control panel.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter controlPanelArn : The Amazon Resource Name (ARN) of the control panel.

Parameter maxResults : The number of objects that you want to return with this call.

Parameter nextToken : The token that identifies which batch of results you want to see.

Implementation

Future<ListSafetyRulesResponse> listSafetyRules({
  required String controlPanelArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/controlpanel/${Uri.encodeComponent(controlPanelArn)}/safetyrules',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSafetyRulesResponse.fromJson(response);
}