updateRuleMetadata method
Updates a rule's metadata. The description attribute can be updated.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.
Parameter description
:
The rule description.
Parameter rule
:
The rule to update.
Implementation
Future<void> updateRuleMetadata({
required String description,
required Rule rule,
}) async {
ArgumentError.checkNotNull(description, 'description');
_s.validateStringLength(
'description',
description,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(rule, 'rule');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateRuleMetadata'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'description': description,
'rule': rule,
},
);
}