Retrieves the details of one or more findings.
Parameters:
-
finding_ids
(Optional[__listOf__string], default:
None
)
–
An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.
-
sort_criteria
(Optional[SortCriteria], default:
None
)
–
The criteria for sorting the results of the request.
Raises:
-
AccessDeniedException
–
Provides information about an error that occurred due to insufficient access to a specified resource.
-
ConflictException
–
Provides information about an error that occurred due to a versioning conflict for a specified resource.
-
InternalServerException
–
Provides information about an error that occurred due to an unknown internal server error, exception, or failure.
-
ResourceNotFoundException
–
Provides information about an error that occurred because a specified resource wasn't found.
-
ServiceQuotaExceededException
–
Provides information about an error that occurred due to one or more service quotas for an account.
-
ThrottlingException
–
Provides information about an error that occurred because too many requests were sent during a certain amount of time.
-
ValidationException
–
Provides information about an error that occurred due to a syntax error in a request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_macie2/_services/async_macie2.py
| async def get_findings(
self,
*,
config_overrides: Optional[AsyncMacie2ClientConfig] = None,
finding_ids: Optional[
"capo_macie2.types.__list_of__string.__listOf__string"
] = None,
sort_criteria: Optional["capo_macie2.types.sort_criteria.SortCriteria"] = None,
) -> "capo_macie2.types.get_findings_response.GetFindingsResponse":
"""<p>Retrieves the details of one or more findings.</p>
Args:
finding_ids: <p>An array of strings that lists the unique identifiers for the findings to retrieve. You can specify as many as 50 unique identifiers in this array.</p>
sort_criteria: <p>The criteria for sorting the results of the request.</p>
Raises:
capo_macie2.errors.access_denied_exception.AccessDeniedException: <p>Provides information about an error that occurred due to insufficient access to a specified resource.</p>
capo_macie2.errors.conflict_exception.ConflictException: <p>Provides information about an error that occurred due to a versioning conflict for a specified resource.</p>
capo_macie2.errors.internal_server_exception.InternalServerException: <p>Provides information about an error that occurred due to an unknown internal server error, exception, or failure.</p>
capo_macie2.errors.resource_not_found_exception.ResourceNotFoundException: <p>Provides information about an error that occurred because a specified resource wasn't found.</p>
capo_macie2.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Provides information about an error that occurred due to one or more service quotas for an account.</p>
capo_macie2.errors.throttling_exception.ThrottlingException: <p>Provides information about an error that occurred because too many requests were sent during a certain amount of time.</p>
capo_macie2.errors.validation_exception.ValidationException: <p>Provides information about an error that occurred due to a syntax error in a request.</p>
capo_macie2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_macie2.types.get_findings_request.GetFindingsRequest]",
) -> AsyncOperationResponse[
"capo_macie2.types.get_findings_response.GetFindingsResponse"
]:
import capo_macie2._operations.macie2.get_findings
(
output,
http_response,
) = await capo_macie2._operations.macie2.get_findings.async_get_findings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetFindings")
)
input_: capo_macie2.types.get_findings_request.GetFindingsRequest = {}
if finding_ids is not None:
input_["finding_ids"] = finding_ids
if sort_criteria is not None:
input_["sort_criteria"] = sort_criteria
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|