- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListOrganizationAdminAccountsCommand
Returns information about the Detective administrator account for an organization. Can only be called by the organization management account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DetectiveClient, ListOrganizationAdminAccountsCommand } from "@aws-sdk/client-detective"; // ES Modules import
// const { DetectiveClient, ListOrganizationAdminAccountsCommand } = require("@aws-sdk/client-detective"); // CommonJS import
const client = new DetectiveClient(config);
const input = { // ListOrganizationAdminAccountsRequest
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new ListOrganizationAdminAccountsCommand(input);
const response = await client.send(command);
// { // ListOrganizationAdminAccountsResponse
// Administrators: [ // AdministratorList
// { // Administrator
// AccountId: "STRING_VALUE",
// GraphArn: "STRING_VALUE",
// DelegationTime: new Date("TIMESTAMP"),
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListOrganizationAdminAccountsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The maximum number of results to return. |
NextToken | string | undefined | For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token. |
ListOrganizationAdminAccountsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Administrators | Administrator[] | undefined | The list of Detective administrator accounts. |
NextToken | string | undefined | If there are more accounts remaining in the results, then this is the pagination token to use to request the next page of accounts. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The request issuer does not have permission to access this resource or perform this operation. |
InternalServerException | server | The request was valid but failed because of a problem with the service. |
TooManyRequestsException | client | The request cannot be completed because too many other requests are occurring at the same time. |
ValidationException | client | The request parameters are invalid. |
DetectiveServiceException | Base exception class for all service exceptions from Detective service. |