- 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.
CreateMemberCommand
Associates an account with an Amazon Macie administrator account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Macie2Client, CreateMemberCommand } from "@aws-sdk/client-macie2"; // ES Modules import
// const { Macie2Client, CreateMemberCommand } = require("@aws-sdk/client-macie2"); // CommonJS import
const client = new Macie2Client(config);
const input = { // CreateMemberRequest
account: { // AccountDetail
accountId: "STRING_VALUE", // required
email: "STRING_VALUE", // required
},
tags: { // TagMap
"<keys>": "STRING_VALUE",
},
};
const command = new CreateMemberCommand(input);
const response = await client.send(command);
// { // CreateMemberResponse
// arn: "STRING_VALUE",
// };
CreateMemberCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
account Required | AccountDetail | undefined | The details of the account to associate with the administrator account. |
tags | Record<string, string> | undefined | A map of key-value pairs that specifies the tags to associate with the account in Amazon Macie. An account can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters. |
CreateMemberCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
arn | string | undefined | The Amazon Resource Name (ARN) of the account that was associated with the administrator account. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Provides information about an error that occurred due to insufficient access to a specified resource. |
ConflictException | client | Provides information about an error that occurred due to a versioning conflict for a specified resource. |
InternalServerException | server | Provides information about an error that occurred due to an unknown internal server error, exception, or failure. |
ResourceNotFoundException | client | Provides information about an error that occurred because a specified resource wasn't found. |
ServiceQuotaExceededException | client | Provides information about an error that occurred due to one or more service quotas for an account. |
ThrottlingException | client | Provides information about an error that occurred because too many requests were sent during a certain amount of time. |
ValidationException | client | Provides information about an error that occurred due to a syntax error in a request. |
Macie2ServiceException | Base exception class for all service exceptions from Macie2 service. |