Skip to content

get_members

get_members(
    graph_arn: GraphArn,
    account_ids: AccountIdList,
    *,
    config_overrides: Optional[DetectiveClientConfig] = None,
) -> GetMembersResponse

Returns the membership details for specified member accounts for a behavior graph.

Parameters:

  • graph_arn (GraphArn) –

    The ARN of the behavior graph for which to request the member details.

  • account_ids (AccountIdList) –

    The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.

    You cannot use GetMembers to retrieve information about member accounts that were removed from the behavior graph.

Raises:

Source code in docs_src/capo_detective/_services/detective.py
def get_members(
    self,
    graph_arn: "capo_detective.types.graph_arn.GraphArn",
    account_ids: "capo_detective.types.account_id_list.AccountIdList",
    *,
    config_overrides: Optional[DetectiveClientConfig] = None,
) -> "capo_detective.types.get_members_response.GetMembersResponse":
    """<p>Returns the membership details for specified member accounts for a behavior graph.</p>

    Args:
        graph_arn: <p>The ARN of the behavior graph for which to request the member details.</p>
        account_ids: <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p> <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>

    Raises:
        capo_detective.errors.access_denied_exception.AccessDeniedException: <p>The request issuer does not have permission to access this resource or perform this operation.</p>
        capo_detective.errors.internal_server_exception.InternalServerException: <p>The request was valid but failed because of a problem with the service.</p>
        capo_detective.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request refers to a nonexistent resource.</p>
        capo_detective.errors.validation_exception.ValidationException: <p>The request parameters are invalid.</p>
        capo_detective.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_detective.types.get_members_request.GetMembersRequest]",
    ) -> OperationResponse[
        "capo_detective.types.get_members_response.GetMembersResponse"
    ]:
        import capo_detective._operations.amazon_detective.get_members

        output, http_response = (
            capo_detective._operations.amazon_detective.get_members.get_members(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_detective.types.get_members_response.GetMembersResponse",
    ) -> dict[str, Any]:
        import capo_detective.types.get_members_response

        return capo_detective.types.get_members_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetMembers", redact_output=_redact_output),
    )
    input_: capo_detective.types.get_members_request.GetMembersRequest = {
        "graph_arn": graph_arn,
        "account_ids": account_ids,
    }

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