Retrieves the current processing status of a previously submitted abuse report, including the status, submission timestamp, and last-update time.
You can poll this operation to track the report's status. PROCESSING confirms that Amazon Web Services received your report and is processing it. COMPLETED means Amazon Web Services finished resolving the report, and the response includes a reasonCode. The time to reach COMPLETED may vary and can take up to several days depending on the scope and complexity of the suspected abuse.
COMPLETED is the only terminal status. To wait for a report, use the ReportProcessing waiter, which succeeds when the report reaches PROCESSING or COMPLETED. If you poll this operation yourself, wait 1–5 seconds between calls.
Parameters:
-
report_id
(ReportId)
–
The unique identifier of the abuse report to retrieve status for. This is the reportId that is returned by CreateAbuseReport.
Raises:
-
AccessDeniedException
–
The caller does not have sufficient access to perform this operation. Verify that the caller has the specific IAM permission for the operation it is calling (for example, abuse:CreateAbuseReport, abuse:GetAbuseReportStatus, or abuse:ListAbuseReportStatuses). Grant only the actions each caller requires.
-
InternalServerException
–
An unexpected error occurred during the processing of the request. This error is retryable; check the Retry-After header before you retry.
-
ThrottlingException
–
The request was denied due to request throttling. This error is retryable; retry with exponential backoff.
-
ValidationException
–
The input fails to satisfy the constraints specified by the service, which indicates that the request is not well-formed. Check fieldList for the specific members that failed validation.
-
ResourceNotFoundException
–
The specified resource was not found. Verify that the reportId is correct.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
Get the status of a submitted report
>>> await client.get_abuse_report_status(report_id='rpt5a8b3c2d1e4f6g7h8i9j0')
Source code in docs_src/capo_abuse_signal/_services/async_abuse_signal.py
| async def get_abuse_report_status(
self,
report_id: "capo_abuse_signal.types.report_id.ReportId",
*,
config_overrides: Optional[AsyncAbuseSignalClientConfig] = None,
) -> "capo_abuse_signal.types.get_abuse_report_status_response.GetAbuseReportStatusResponse":
"""<p>Retrieves the current processing status of a previously submitted abuse report, including the status, submission timestamp, and last-update time.</p> <p>You can poll this operation to track the report's status. <code>PROCESSING</code> confirms that Amazon Web Services received your report and is processing it. <code>COMPLETED</code> means Amazon Web Services finished resolving the report, and the response includes a <code>reasonCode</code>. The time to reach <code>COMPLETED</code> may vary and can take up to several days depending on the scope and complexity of the suspected abuse.</p> <note> <p> <code>COMPLETED</code> is the only terminal status. To wait for a report, use the <code>ReportProcessing</code> waiter, which succeeds when the report reaches <code>PROCESSING</code> or <code>COMPLETED</code>. If you poll this operation yourself, wait 1–5 seconds between calls.</p> </note>
Args:
report_id: <p>The unique identifier of the abuse report to retrieve status for. This is the <code>reportId</code> that is returned by <a>CreateAbuseReport</a>.</p>
Raises:
capo_abuse_signal.errors.access_denied_exception.AccessDeniedException: <p>The caller does not have sufficient access to perform this operation. Verify that the caller has the specific IAM permission for the operation it is calling (for example, <code>abuse:CreateAbuseReport</code>, <code>abuse:GetAbuseReportStatus</code>, or <code>abuse:ListAbuseReportStatuses</code>). Grant only the actions each caller requires.</p>
capo_abuse_signal.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request. This error is retryable; check the <code>Retry-After</code> header before you retry.</p>
capo_abuse_signal.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. This error is retryable; retry with exponential backoff.</p>
capo_abuse_signal.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service, which indicates that the request is not well-formed. Check <code>fieldList</code> for the specific members that failed validation.</p>
capo_abuse_signal.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the <code>reportId</code> is correct.</p>
capo_abuse_signal.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get the status of a submitted report
>>> await client.get_abuse_report_status(report_id='rpt5a8b3c2d1e4f6g7h8i9j0')
"""
async def _handler(
req: "AsyncOperationRequest[capo_abuse_signal.types.get_abuse_report_status_request.GetAbuseReportStatusRequest]",
) -> AsyncOperationResponse[
"capo_abuse_signal.types.get_abuse_report_status_response.GetAbuseReportStatusResponse"
]:
import capo_abuse_signal._operations.abuse_report_api.get_abuse_report_status
(
output,
http_response,
) = await capo_abuse_signal._operations.abuse_report_api.get_abuse_report_status.async_get_abuse_report_status(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAbuseReportStatus")
)
input_: capo_abuse_signal.types.get_abuse_report_status_request.GetAbuseReportStatusRequest = {
"report_id": report_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|