updateDetectorVersionMetadata method

Future<void> updateDetectorVersionMetadata({
  1. required String description,
  2. required String detectorId,
  3. required String detectorVersionId,
})

Updates the detector version's description. You can update the metadata for any detector version (DRAFT, ACTIVE, or INACTIVE).

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

Parameter description : The description.

Parameter detectorId : The detector ID.

Parameter detectorVersionId : The detector version ID.

Implementation

Future<void> updateDetectorVersionMetadata({
  required String description,
  required String detectorId,
  required String detectorVersionId,
}) async {
  ArgumentError.checkNotNull(description, 'description');
  _s.validateStringLength(
    'description',
    description,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(detectorVersionId, 'detectorVersionId');
  _s.validateStringLength(
    'detectorVersionId',
    detectorVersionId,
    1,
    5,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateDetectorVersionMetadata'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'description': description,
      'detectorId': detectorId,
      'detectorVersionId': detectorVersionId,
    },
  );
}