Returns all organization-level configurations for custom detection rules. You can filter the results by status.
Parameters:
Raises:
Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
| async def list_custom_detection_rule_org_configurations(
self,
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
max_results: Optional[
"capo_guardduty.types.detection_rule_max_results.DetectionRuleMaxResults"
] = None,
next_token: Optional["capo_guardduty.types.string.String"] = None,
status: Optional[
"capo_guardduty.types.detection_rule_configuration_status.DetectionRuleConfigurationStatus"
] = None,
) -> "capo_guardduty.types.list_custom_detection_rule_org_configurations_response.ListCustomDetectionRuleOrgConfigurationsResponse":
"""<p>Returns all organization-level configurations for custom detection rules. You can filter the results by status.</p>
Args:
max_results: <p>The maximum number of results to return in a single page. Minimum value of 1, maximum value of 100.</p>
next_token: <p>A pagination token from a previous response. Use this token to retrieve the next page of results.</p>
status: <p>The configuration status to filter by.</p>
Raises:
capo_guardduty.errors.access_denied_exception.AccessDeniedException: <p>An access denied exception object.</p>
capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_guardduty.types.list_custom_detection_rule_org_configurations_request.ListCustomDetectionRuleOrgConfigurationsRequest]",
) -> AsyncOperationResponse[
"capo_guardduty.types.list_custom_detection_rule_org_configurations_response.ListCustomDetectionRuleOrgConfigurationsResponse"
]:
import capo_guardduty._operations.guard_duty_api_service.list_custom_detection_rule_org_configurations
(
output,
http_response,
) = await capo_guardduty._operations.guard_duty_api_service.list_custom_detection_rule_org_configurations.async_list_custom_detection_rule_org_configurations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListCustomDetectionRuleOrgConfigurations"),
)
input_: capo_guardduty.types.list_custom_detection_rule_org_configurations_request.ListCustomDetectionRuleOrgConfigurationsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
if status is not None:
input_["status"] = status
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|