Returns details about a scan, including whether or not a scan has completed.
Parameters:
-
scan_name
(ScanName)
–
The name of the scan you want to view details about.
-
run_id
(Optional[Uuid], default:
None
)
–
UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the CreateScan operation. Defaults to the latest scan run if missing.
Raises:
Source code in docs_src/capo_codeguru_security/_services/async_code_guru_security.py
| async def get_scan(
self,
scan_name: "capo_codeguru_security.types.scan_name.ScanName",
*,
config_overrides: Optional[AsyncCodeGuruSecurityClientConfig] = None,
run_id: Optional["capo_codeguru_security.types.uuid.Uuid"] = None,
) -> "capo_codeguru_security.types.get_scan_response.GetScanResponse":
"""<p>Returns details about a scan, including whether or not a scan has completed.</p>
Args:
scan_name: <p>The name of the scan you want to view details about.</p>
run_id: <p>UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the <code>CreateScan</code> operation. Defaults to the latest scan run if missing.</p>
Raises:
capo_codeguru_security.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_codeguru_security.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
capo_codeguru_security.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request was not found.</p>
capo_codeguru_security.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_codeguru_security.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
capo_codeguru_security.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_codeguru_security.types.get_scan_request.GetScanRequest]",
) -> AsyncOperationResponse[
"capo_codeguru_security.types.get_scan_response.GetScanResponse"
]:
import capo_codeguru_security._operations.aws_code_guru_security.get_scan
(
output,
http_response,
) = await capo_codeguru_security._operations.aws_code_guru_security.get_scan.async_get_scan(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetScan")
)
input_: capo_codeguru_security.types.get_scan_request.GetScanRequest = {
"scan_name": scan_name
}
if run_id is not None:
input_["run_id"] = run_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|