Removes the member account from the specified behavior graph. This operation can only be called by an invited member account that has the ENABLED status.
DisassociateMembership cannot be called by an organization account in the organization behavior graph. For the organization behavior graph, the Detective administrator account determines which organization accounts to enable or disable as member accounts.
Parameters:
-
graph_arn
(GraphArn)
–
The ARN of the behavior graph to remove the member account from.
The member account's member status in the behavior graph must be ENABLED.
Raises:
Source code in docs_src/capo_detective/_services/async_detective.py
| async def disassociate_membership(
self,
graph_arn: "capo_detective.types.graph_arn.GraphArn",
*,
config_overrides: Optional[AsyncDetectiveClientConfig] = None,
) -> None:
"""<p>Removes the member account from the specified behavior graph. This operation can only be called by an invited member account that has the <code>ENABLED</code> status.</p> <p> <code>DisassociateMembership</code> cannot be called by an organization account in the organization behavior graph. For the organization behavior graph, the Detective administrator account determines which organization accounts to enable or disable as member accounts.</p>
Args:
graph_arn: <p>The ARN of the behavior graph to remove the member account from.</p> <p>The member account's member status in the behavior graph must be <code>ENABLED</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_detective.types.disassociate_membership_request.DisassociateMembershipRequest]",
) -> AsyncOperationResponse[None]:
import capo_detective._operations.amazon_detective.disassociate_membership
(
output,
http_response,
) = await capo_detective._operations.amazon_detective.disassociate_membership.async_disassociate_membership(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateMembership")
)
input_: capo_detective.types.disassociate_membership_request.DisassociateMembershipRequest = {
"graph_arn": graph_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|