Skip to content

accept_invitation

accept_invitation(
    graph_arn: GraphArn, *, config_overrides: Optional[DetectiveClientConfig] = None
) -> None

Accepts an invitation for the member account to contribute data to a behavior graph. This operation can only be called by an invited member account.

The request provides the ARN of behavior graph.

The member account status in the graph must be INVITED.

Parameters:

  • graph_arn (GraphArn) –

    The ARN of the behavior graph that the member account is accepting the invitation for.

    The member account status in the behavior graph must be INVITED.

Raises:

Source code in docs_src/capo_detective/_services/detective.py
def accept_invitation(
    self,
    graph_arn: "capo_detective.types.graph_arn.GraphArn",
    *,
    config_overrides: Optional[DetectiveClientConfig] = None,
) -> None:
    """<p>Accepts an invitation for the member account to contribute data to a behavior graph. This operation can only be called by an invited member account. </p> <p>The request provides the ARN of behavior graph.</p> <p>The member account status in the graph must be <code>INVITED</code>.</p>

    Args:
        graph_arn: <p>The ARN of the behavior graph that the member account is accepting the invitation for.</p> <p>The member account status in the behavior graph must be <code>INVITED</code>.</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.conflict_exception.ConflictException: <p>The request attempted an invalid action.</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.accept_invitation_request.AcceptInvitationRequest]",
    ) -> OperationResponse[None]:
        import capo_detective._operations.amazon_detective.accept_invitation

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AcceptInvitation")
    )
    input_: capo_detective.types.accept_invitation_request.AcceptInvitationRequest = {
        "graph_arn": graph_arn
    }

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