startResourceScan method

Future<void> startResourceScan({
  1. required String analyzerArn,
  2. required String resourceArn,
  3. String? resourceOwnerAccount,
})

Immediately starts a scan of the policies applied to the specified resource.

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

Parameter analyzerArn : The ARN of the analyzer to use to scan the policies applied to the specified resource.

Parameter resourceArn : The ARN of the resource to scan.

Parameter resourceOwnerAccount : The Amazon Web Services account ID that owns the resource. For most Amazon Web Services resources, the owning account is the account in which the resource was created.

Implementation

Future<void> startResourceScan({
  required String analyzerArn,
  required String resourceArn,
  String? resourceOwnerAccount,
}) async {
  final $payload = <String, dynamic>{
    'analyzerArn': analyzerArn,
    'resourceArn': resourceArn,
    if (resourceOwnerAccount != null)
      'resourceOwnerAccount': resourceOwnerAccount,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/resource/scan',
    exceptionFnMap: _exceptionFns,
  );
}