DeleteMembersCommand

Removes the specified member accounts from the behavior graph. The removed accounts no longer contribute data to the behavior graph. This operation can only be called by the administrator account for the behavior graph.

For invited accounts, the removed accounts are deleted from the list of accounts in the behavior graph. To restore the account, the administrator account must send another invitation.

For organization accounts in the organization behavior graph, the Detective administrator account can always enable the organization account again. Organization accounts that are not enabled as member accounts are not included in the ListMembers results for the organization behavior graph.

An administrator account cannot use DeleteMembers to remove their own account from the behavior graph. To disable a behavior graph, the administrator account uses the DeleteGraph API method.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DetectiveClient, DeleteMembersCommand } from "@aws-sdk/client-detective"; // ES Modules import
// const { DetectiveClient, DeleteMembersCommand } = require("@aws-sdk/client-detective"); // CommonJS import
const client = new DetectiveClient(config);
const input = { // DeleteMembersRequest
  GraphArn: "STRING_VALUE", // required
  AccountIds: [ // AccountIdList // required
    "STRING_VALUE",
  ],
};
const command = new DeleteMembersCommand(input);
const response = await client.send(command);
// { // DeleteMembersResponse
//   AccountIds: [ // AccountIdList
//     "STRING_VALUE",
//   ],
//   UnprocessedAccounts: [ // UnprocessedAccountList
//     { // UnprocessedAccount
//       AccountId: "STRING_VALUE",
//       Reason: "STRING_VALUE",
//     },
//   ],
// };

DeleteMembersCommand Input

See DeleteMembersCommandInput for more details

Parameter
Type
Description
AccountIds
Required
string[] | undefined

The list of Amazon Web Services account identifiers for the member accounts to remove from the behavior graph. You can remove up to 50 member accounts at a time.

GraphArn
Required
string | undefined

The ARN of the behavior graph to remove members from.

DeleteMembersCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
AccountIds
string[] | undefined

The list of Amazon Web Services account identifiers for the member accounts that Detective successfully removed from the behavior graph.

UnprocessedAccounts
UnprocessedAccount[] | undefined

The list of member accounts that Detective was not able to remove from the behavior graph. For each member account, provides the reason that the deletion could not be processed.

Throws

Name
Fault
Details
AccessDeniedException
client

The request issuer does not have permission to access this resource or perform this operation.

ConflictException
client

The request attempted an invalid action.

InternalServerException
server

The request was valid but failed because of a problem with the service.

ResourceNotFoundException
client

The request refers to a nonexistent resource.

ValidationException
client

The request parameters are invalid.

DetectiveServiceException
Base exception class for all service exceptions from Detective service.