updateAuditSuppression method
Future<void>
updateAuditSuppression({
- required String checkName,
- required ResourceIdentifier resourceIdentifier,
- String? description,
- DateTime? expirationDate,
- bool? suppressIndefinitely,
Updates a Device Defender audit suppression.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalFailureException.
Parameter description
:
The description of the audit suppression.
Parameter expirationDate
:
The expiration date (epoch timestamp in seconds) that you want the
suppression to adhere to.
Parameter suppressIndefinitely
:
Indicates whether a suppression should exist indefinitely or not.
Implementation
Future<void> updateAuditSuppression({
required String checkName,
required ResourceIdentifier resourceIdentifier,
String? description,
DateTime? expirationDate,
bool? suppressIndefinitely,
}) async {
ArgumentError.checkNotNull(checkName, 'checkName');
ArgumentError.checkNotNull(resourceIdentifier, 'resourceIdentifier');
_s.validateStringLength(
'description',
description,
0,
1000,
);
final $payload = <String, dynamic>{
'checkName': checkName,
'resourceIdentifier': resourceIdentifier,
if (description != null) 'description': description,
if (expirationDate != null)
'expirationDate': unixTimestampToJson(expirationDate),
if (suppressIndefinitely != null)
'suppressIndefinitely': suppressIndefinitely,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/audit/suppressions/update',
exceptionFnMap: _exceptionFns,
);
}