updateDetectorVersionStatus method
Updates the detector version’s status. You can perform the following
promotions or demotions using UpdateDetectorVersionStatus:
DRAFT to ACTIVE, ACTIVE to
INACTIVE, and INACTIVE to ACTIVE.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter detectorId :
The detector ID.
Parameter detectorVersionId :
The detector version ID.
Parameter status :
The new status.
The only supported values are ACTIVE and
INACTIVE
Implementation
Future<void> updateDetectorVersionStatus({
required String detectorId,
required String detectorVersionId,
required DetectorVersionStatus status,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateDetectorVersionStatus'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'detectorId': detectorId,
'detectorVersionId': detectorVersionId,
'status': status.value,
},
);
}