startScanJob method

Future<StartScanJobOutput> startScanJob({
  1. required String backupVaultName,
  2. required String iamRoleArn,
  3. required MalwareScanner malwareScanner,
  4. required String recoveryPointArn,
  5. required ScanMode scanMode,
  6. required String scannerRoleArn,
  7. DateTime? continuousScanEndTime,
  8. String? idempotencyToken,
  9. String? scanBaseRecoveryPointArn,
})

Starts scanning jobs for specific resources.

May throw InvalidParameterValueException. May throw InvalidRequestException. May throw LimitExceededException. May throw MissingParameterValueException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter backupVaultName : The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.

Pattern: ^[a-zA-Z0-9-_]{2,50}$

Parameter iamRoleArn : Specifies the IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.

Parameter malwareScanner : Specifies the malware scanner used during the scan job. Currently only supports GUARDDUTY.

Parameter recoveryPointArn : An Amazon Resource Name (ARN) that uniquely identifies a recovery point. This is your target recovery point for a full scan. If you are running an incremental scan, this will be your a recovery point which has been created after your base recovery point selection.

Parameter scanMode : Specifies the scan type use for the scan job.

Includes:

  • FULL_SCAN will scan the entire data lineage within the backup.
  • INCREMENTAL_SCAN will scan the data difference between the target recovery point and base recovery point ARN.

Parameter scannerRoleArn : Specified the IAM scanner role ARN.

Parameter continuousScanEndTime : The point in time the scan job will scan up to for a continuous backup.

Parameter idempotencyToken : A customer-chosen string that you can use to distinguish between otherwise identical calls to StartScanJob. Retrying a successful request with the same idempotency token results in a success message with no action taken.

Parameter scanBaseRecoveryPointArn : An ARN that uniquely identifies the base recovery point to be used for incremental scanning.

Implementation

Future<StartScanJobOutput> startScanJob({
  required String backupVaultName,
  required String iamRoleArn,
  required MalwareScanner malwareScanner,
  required String recoveryPointArn,
  required ScanMode scanMode,
  required String scannerRoleArn,
  DateTime? continuousScanEndTime,
  String? idempotencyToken,
  String? scanBaseRecoveryPointArn,
}) async {
  final $payload = <String, dynamic>{
    'BackupVaultName': backupVaultName,
    'IamRoleArn': iamRoleArn,
    'MalwareScanner': malwareScanner.value,
    'RecoveryPointArn': recoveryPointArn,
    'ScanMode': scanMode.value,
    'ScannerRoleArn': scannerRoleArn,
    if (continuousScanEndTime != null)
      'ContinuousScanEndTime': unixTimestampToJson(continuousScanEndTime),
    if (idempotencyToken != null) 'IdempotencyToken': idempotencyToken,
    if (scanBaseRecoveryPointArn != null)
      'ScanBaseRecoveryPointArn': scanBaseRecoveryPointArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/scan/job',
    exceptionFnMap: _exceptionFns,
  );
  return StartScanJobOutput.fromJson(response);
}