Skip to content

get_member_detectors

get_member_detectors(
    detector_id: DetectorId,
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    account_ids: Optional[AccountIds] = None,
) -> GetMemberDetectorsResponse

Describes which data sources are enabled for the member account's detector.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

Parameters:

  • detector_id (DetectorId) –

    The detector ID for the administrator account.

    To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

  • account_ids (Optional[AccountIds], default: None ) –

    A list of member account IDs.

Raises:

Source code in docs_src/capo_guardduty/_services/guard_duty.py
def get_member_detectors(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    account_ids: Optional["capo_guardduty.types.account_ids.AccountIds"] = None,
) -> (
    "capo_guardduty.types.get_member_detectors_response.GetMemberDetectorsResponse"
):
    """<p>Describes which data sources are enabled for the member account's detector.</p> <p>There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see <a href="https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_regions.html">Regions and endpoints</a>.</p>

    Args:
        detector_id: <p>The detector ID for the administrator account.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
        account_ids: <p>A list of member account IDs.</p>

    Raises:
        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.
    """

    def _handler(
        req: "OperationRequest[capo_guardduty.types.get_member_detectors_request.GetMemberDetectorsRequest]",
    ) -> OperationResponse[
        "capo_guardduty.types.get_member_detectors_response.GetMemberDetectorsResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.get_member_detectors

        output, http_response = (
            capo_guardduty._operations.guard_duty_api_service.get_member_detectors.get_member_detectors(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetMemberDetectors")
    )
    input_: capo_guardduty.types.get_member_detectors_request.GetMemberDetectorsRequest = {
        "detector_id": detector_id
    }
    if account_ids is not None:
        input_["account_ids"] = account_ids

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output