updateSafetyRule method

Future<UpdateSafetyRuleResponse> updateSafetyRule({
  1. AssertionRuleUpdate? assertionRuleUpdate,
  2. GatingRuleUpdate? gatingRuleUpdate,
})

Update a safety rule (an assertion rule or gating rule). You can only update the name and the waiting period for a safety rule. To make other updates, delete the safety rule and create a new one.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter assertionRuleUpdate : The assertion rule to update.

Parameter gatingRuleUpdate : The gating rule to update.

Implementation

Future<UpdateSafetyRuleResponse> updateSafetyRule({
  AssertionRuleUpdate? assertionRuleUpdate,
  GatingRuleUpdate? gatingRuleUpdate,
}) async {
  final $payload = <String, dynamic>{
    if (assertionRuleUpdate != null)
      'AssertionRuleUpdate': assertionRuleUpdate,
    if (gatingRuleUpdate != null) 'GatingRuleUpdate': gatingRuleUpdate,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/safetyrule',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSafetyRuleResponse.fromJson(response);
}