diff --git a/clients/client-account/README.md b/clients/client-account/README.md index 6072f6592cafa..67b7e4557ea40 100644 --- a/clients/client-account/README.md +++ b/clients/client-account/README.md @@ -203,6 +203,14 @@ see LICENSE for more information. ## Client Commands (Operations List) +
+ +AcceptPrimaryEmailUpdate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/account/command/AcceptPrimaryEmailUpdateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/AcceptPrimaryEmailUpdateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/AcceptPrimaryEmailUpdateCommandOutput/) + +
DeleteAlternateContact @@ -242,6 +250,14 @@ GetContactInformation [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/account/command/GetContactInformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/GetContactInformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/GetContactInformationCommandOutput/) +
+
+ +GetPrimaryEmail + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/account/command/GetPrimaryEmailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/GetPrimaryEmailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/GetPrimaryEmailCommandOutput/) +
@@ -275,3 +291,11 @@ PutContactInformation [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/account/command/PutContactInformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/PutContactInformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/PutContactInformationCommandOutput/)
+
+ +StartPrimaryEmailUpdate + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/account/command/StartPrimaryEmailUpdateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/StartPrimaryEmailUpdateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-account/Interface/StartPrimaryEmailUpdateCommandOutput/) + +
diff --git a/clients/client-account/src/Account.ts b/clients/client-account/src/Account.ts index d5bd47c4255ed..47ee341706bef 100644 --- a/clients/client-account/src/Account.ts +++ b/clients/client-account/src/Account.ts @@ -3,6 +3,11 @@ import { createAggregatedClient } from "@smithy/smithy-client"; import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; import { AccountClient, AccountClientConfig } from "./AccountClient"; +import { + AcceptPrimaryEmailUpdateCommand, + AcceptPrimaryEmailUpdateCommandInput, + AcceptPrimaryEmailUpdateCommandOutput, +} from "./commands/AcceptPrimaryEmailUpdateCommand"; import { DeleteAlternateContactCommand, DeleteAlternateContactCommandInput, @@ -28,6 +33,11 @@ import { GetContactInformationCommandInput, GetContactInformationCommandOutput, } from "./commands/GetContactInformationCommand"; +import { + GetPrimaryEmailCommand, + GetPrimaryEmailCommandInput, + GetPrimaryEmailCommandOutput, +} from "./commands/GetPrimaryEmailCommand"; import { GetRegionOptStatusCommand, GetRegionOptStatusCommandInput, @@ -44,20 +54,45 @@ import { PutContactInformationCommandInput, PutContactInformationCommandOutput, } from "./commands/PutContactInformationCommand"; +import { + StartPrimaryEmailUpdateCommand, + StartPrimaryEmailUpdateCommandInput, + StartPrimaryEmailUpdateCommandOutput, +} from "./commands/StartPrimaryEmailUpdateCommand"; const commands = { + AcceptPrimaryEmailUpdateCommand, DeleteAlternateContactCommand, DisableRegionCommand, EnableRegionCommand, GetAlternateContactCommand, GetContactInformationCommand, + GetPrimaryEmailCommand, GetRegionOptStatusCommand, ListRegionsCommand, PutAlternateContactCommand, PutContactInformationCommand, + StartPrimaryEmailUpdateCommand, }; export interface Account { + /** + * @see {@link AcceptPrimaryEmailUpdateCommand} + */ + acceptPrimaryEmailUpdate( + args: AcceptPrimaryEmailUpdateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + acceptPrimaryEmailUpdate( + args: AcceptPrimaryEmailUpdateCommandInput, + cb: (err: any, data?: AcceptPrimaryEmailUpdateCommandOutput) => void + ): void; + acceptPrimaryEmailUpdate( + args: AcceptPrimaryEmailUpdateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AcceptPrimaryEmailUpdateCommandOutput) => void + ): void; + /** * @see {@link DeleteAlternateContactCommand} */ @@ -132,6 +167,20 @@ export interface Account { cb: (err: any, data?: GetContactInformationCommandOutput) => void ): void; + /** + * @see {@link GetPrimaryEmailCommand} + */ + getPrimaryEmail( + args: GetPrimaryEmailCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getPrimaryEmail(args: GetPrimaryEmailCommandInput, cb: (err: any, data?: GetPrimaryEmailCommandOutput) => void): void; + getPrimaryEmail( + args: GetPrimaryEmailCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPrimaryEmailCommandOutput) => void + ): void; + /** * @see {@link GetRegionOptStatusCommand} */ @@ -194,6 +243,23 @@ export interface Account { options: __HttpHandlerOptions, cb: (err: any, data?: PutContactInformationCommandOutput) => void ): void; + + /** + * @see {@link StartPrimaryEmailUpdateCommand} + */ + startPrimaryEmailUpdate( + args: StartPrimaryEmailUpdateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startPrimaryEmailUpdate( + args: StartPrimaryEmailUpdateCommandInput, + cb: (err: any, data?: StartPrimaryEmailUpdateCommandOutput) => void + ): void; + startPrimaryEmailUpdate( + args: StartPrimaryEmailUpdateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartPrimaryEmailUpdateCommandOutput) => void + ): void; } /** diff --git a/clients/client-account/src/AccountClient.ts b/clients/client-account/src/AccountClient.ts index aacdc2d8e9fdb..7d924905cd8d3 100644 --- a/clients/client-account/src/AccountClient.ts +++ b/clients/client-account/src/AccountClient.ts @@ -53,6 +53,10 @@ import { HttpAuthSchemeResolvedConfig, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider"; +import { + AcceptPrimaryEmailUpdateCommandInput, + AcceptPrimaryEmailUpdateCommandOutput, +} from "./commands/AcceptPrimaryEmailUpdateCommand"; import { DeleteAlternateContactCommandInput, DeleteAlternateContactCommandOutput, @@ -67,6 +71,7 @@ import { GetContactInformationCommandInput, GetContactInformationCommandOutput, } from "./commands/GetContactInformationCommand"; +import { GetPrimaryEmailCommandInput, GetPrimaryEmailCommandOutput } from "./commands/GetPrimaryEmailCommand"; import { GetRegionOptStatusCommandInput, GetRegionOptStatusCommandOutput } from "./commands/GetRegionOptStatusCommand"; import { ListRegionsCommandInput, ListRegionsCommandOutput } from "./commands/ListRegionsCommand"; import { @@ -77,6 +82,10 @@ import { PutContactInformationCommandInput, PutContactInformationCommandOutput, } from "./commands/PutContactInformationCommand"; +import { + StartPrimaryEmailUpdateCommandInput, + StartPrimaryEmailUpdateCommandOutput, +} from "./commands/StartPrimaryEmailUpdateCommand"; import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, @@ -92,29 +101,35 @@ export { __Client }; * @public */ export type ServiceInputTypes = + | AcceptPrimaryEmailUpdateCommandInput | DeleteAlternateContactCommandInput | DisableRegionCommandInput | EnableRegionCommandInput | GetAlternateContactCommandInput | GetContactInformationCommandInput + | GetPrimaryEmailCommandInput | GetRegionOptStatusCommandInput | ListRegionsCommandInput | PutAlternateContactCommandInput - | PutContactInformationCommandInput; + | PutContactInformationCommandInput + | StartPrimaryEmailUpdateCommandInput; /** * @public */ export type ServiceOutputTypes = + | AcceptPrimaryEmailUpdateCommandOutput | DeleteAlternateContactCommandOutput | DisableRegionCommandOutput | EnableRegionCommandOutput | GetAlternateContactCommandOutput | GetContactInformationCommandOutput + | GetPrimaryEmailCommandOutput | GetRegionOptStatusCommandOutput | ListRegionsCommandOutput | PutAlternateContactCommandOutput - | PutContactInformationCommandOutput; + | PutContactInformationCommandOutput + | StartPrimaryEmailUpdateCommandOutput; /** * @public diff --git a/clients/client-account/src/commands/AcceptPrimaryEmailUpdateCommand.ts b/clients/client-account/src/commands/AcceptPrimaryEmailUpdateCommand.ts new file mode 100644 index 0000000000000..a74d108e3749a --- /dev/null +++ b/clients/client-account/src/commands/AcceptPrimaryEmailUpdateCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + AcceptPrimaryEmailUpdateRequest, + AcceptPrimaryEmailUpdateRequestFilterSensitiveLog, + AcceptPrimaryEmailUpdateResponse, +} from "../models/models_0"; +import { de_AcceptPrimaryEmailUpdateCommand, se_AcceptPrimaryEmailUpdateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link AcceptPrimaryEmailUpdateCommand}. + */ +export interface AcceptPrimaryEmailUpdateCommandInput extends AcceptPrimaryEmailUpdateRequest {} +/** + * @public + * + * The output of {@link AcceptPrimaryEmailUpdateCommand}. + */ +export interface AcceptPrimaryEmailUpdateCommandOutput extends AcceptPrimaryEmailUpdateResponse, __MetadataBearer {} + +/** + *

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known + * as the root user email address) for the specified account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, AcceptPrimaryEmailUpdateCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, AcceptPrimaryEmailUpdateCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const input = { // AcceptPrimaryEmailUpdateRequest + * AccountId: "STRING_VALUE", // required + * PrimaryEmail: "STRING_VALUE", // required + * Otp: "STRING_VALUE", // required + * }; + * const command = new AcceptPrimaryEmailUpdateCommand(input); + * const response = await client.send(command); + * // { // AcceptPrimaryEmailUpdateResponse + * // Status: "STRING_VALUE", + * // }; + * + * ``` + * + * @param AcceptPrimaryEmailUpdateCommandInput - {@link AcceptPrimaryEmailUpdateCommandInput} + * @returns {@link AcceptPrimaryEmailUpdateCommandOutput} + * @see {@link AcceptPrimaryEmailUpdateCommandInput} for command's `input` shape. + * @see {@link AcceptPrimaryEmailUpdateCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The operation failed because the calling identity doesn't have the minimum required + * permissions.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of a conflict in the current status of the + * resource. For example, this happens if you try to enable a Region that is currently being disabled + * (in a status of DISABLING).

+ * + * @throws {@link InternalServerException} (server fault) + *

The operation failed because of an error internal to Amazon Web Services. Try your operation again + * later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The operation failed because it specified a resource that can't be found.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

The operation failed because it was called too frequently and exceeded a throttle + * limit.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed because one of the input parameters was invalid.

+ * + * @throws {@link AccountServiceException} + *

Base exception class for all service exceptions from Account service.

+ * + * @public + */ +export class AcceptPrimaryEmailUpdateCommand extends $Command + .classBuilder< + AcceptPrimaryEmailUpdateCommandInput, + AcceptPrimaryEmailUpdateCommandOutput, + AccountClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: AccountClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Account", "AcceptPrimaryEmailUpdate", {}) + .n("AccountClient", "AcceptPrimaryEmailUpdateCommand") + .f(AcceptPrimaryEmailUpdateRequestFilterSensitiveLog, void 0) + .ser(se_AcceptPrimaryEmailUpdateCommand) + .de(de_AcceptPrimaryEmailUpdateCommand) + .build() {} diff --git a/clients/client-account/src/commands/DisableRegionCommand.ts b/clients/client-account/src/commands/DisableRegionCommand.ts index 411283245579a..0166ed1fece62 100644 --- a/clients/client-account/src/commands/DisableRegionCommand.ts +++ b/clients/client-account/src/commands/DisableRegionCommand.ts @@ -29,6 +29,10 @@ export interface DisableRegionCommandOutput extends __MetadataBearer {} /** *

Disables (opts-out) a particular Region for an account.

+ * + *

The act of disabling a Region will remove all IAM access to any resources that + * reside in that Region.

+ *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-account/src/commands/GetPrimaryEmailCommand.ts b/clients/client-account/src/commands/GetPrimaryEmailCommand.ts new file mode 100644 index 0000000000000..9f1240111b909 --- /dev/null +++ b/clients/client-account/src/commands/GetPrimaryEmailCommand.ts @@ -0,0 +1,104 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + GetPrimaryEmailRequest, + GetPrimaryEmailResponse, + GetPrimaryEmailResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetPrimaryEmailCommand, se_GetPrimaryEmailCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetPrimaryEmailCommand}. + */ +export interface GetPrimaryEmailCommandInput extends GetPrimaryEmailRequest {} +/** + * @public + * + * The output of {@link GetPrimaryEmailCommand}. + */ +export interface GetPrimaryEmailCommandOutput extends GetPrimaryEmailResponse, __MetadataBearer {} + +/** + *

Retrieves the primary email address for the specified account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, GetPrimaryEmailCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, GetPrimaryEmailCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const input = { // GetPrimaryEmailRequest + * AccountId: "STRING_VALUE", // required + * }; + * const command = new GetPrimaryEmailCommand(input); + * const response = await client.send(command); + * // { // GetPrimaryEmailResponse + * // PrimaryEmail: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetPrimaryEmailCommandInput - {@link GetPrimaryEmailCommandInput} + * @returns {@link GetPrimaryEmailCommandOutput} + * @see {@link GetPrimaryEmailCommandInput} for command's `input` shape. + * @see {@link GetPrimaryEmailCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The operation failed because the calling identity doesn't have the minimum required + * permissions.

+ * + * @throws {@link InternalServerException} (server fault) + *

The operation failed because of an error internal to Amazon Web Services. Try your operation again + * later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The operation failed because it specified a resource that can't be found.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

The operation failed because it was called too frequently and exceeded a throttle + * limit.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed because one of the input parameters was invalid.

+ * + * @throws {@link AccountServiceException} + *

Base exception class for all service exceptions from Account service.

+ * + * @public + */ +export class GetPrimaryEmailCommand extends $Command + .classBuilder< + GetPrimaryEmailCommandInput, + GetPrimaryEmailCommandOutput, + AccountClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: AccountClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Account", "GetPrimaryEmail", {}) + .n("AccountClient", "GetPrimaryEmailCommand") + .f(void 0, GetPrimaryEmailResponseFilterSensitiveLog) + .ser(se_GetPrimaryEmailCommand) + .de(de_GetPrimaryEmailCommand) + .build() {} diff --git a/clients/client-account/src/commands/PutContactInformationCommand.ts b/clients/client-account/src/commands/PutContactInformationCommand.ts index fc1160e2f3d7a..4585531f6e3b8 100644 --- a/clients/client-account/src/commands/PutContactInformationCommand.ts +++ b/clients/client-account/src/commands/PutContactInformationCommand.ts @@ -30,7 +30,7 @@ export interface PutContactInformationCommandOutput extends __MetadataBearer {} /** *

Updates the primary contact information of an Amazon Web Services account.

*

For complete details about how to use the primary contact operations, see Update - * the primary and alternate contact information.

+ * the primary and alternate contact information.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-account/src/commands/StartPrimaryEmailUpdateCommand.ts b/clients/client-account/src/commands/StartPrimaryEmailUpdateCommand.ts new file mode 100644 index 0000000000000..2a54cf28699b6 --- /dev/null +++ b/clients/client-account/src/commands/StartPrimaryEmailUpdateCommand.ts @@ -0,0 +1,111 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + StartPrimaryEmailUpdateRequest, + StartPrimaryEmailUpdateRequestFilterSensitiveLog, + StartPrimaryEmailUpdateResponse, +} from "../models/models_0"; +import { de_StartPrimaryEmailUpdateCommand, se_StartPrimaryEmailUpdateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StartPrimaryEmailUpdateCommand}. + */ +export interface StartPrimaryEmailUpdateCommandInput extends StartPrimaryEmailUpdateRequest {} +/** + * @public + * + * The output of {@link StartPrimaryEmailUpdateCommand}. + */ +export interface StartPrimaryEmailUpdateCommandOutput extends StartPrimaryEmailUpdateResponse, __MetadataBearer {} + +/** + *

Starts the process to update the primary email address for the specified + * account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AccountClient, StartPrimaryEmailUpdateCommand } from "@aws-sdk/client-account"; // ES Modules import + * // const { AccountClient, StartPrimaryEmailUpdateCommand } = require("@aws-sdk/client-account"); // CommonJS import + * const client = new AccountClient(config); + * const input = { // StartPrimaryEmailUpdateRequest + * AccountId: "STRING_VALUE", // required + * PrimaryEmail: "STRING_VALUE", // required + * }; + * const command = new StartPrimaryEmailUpdateCommand(input); + * const response = await client.send(command); + * // { // StartPrimaryEmailUpdateResponse + * // Status: "STRING_VALUE", + * // }; + * + * ``` + * + * @param StartPrimaryEmailUpdateCommandInput - {@link StartPrimaryEmailUpdateCommandInput} + * @returns {@link StartPrimaryEmailUpdateCommandOutput} + * @see {@link StartPrimaryEmailUpdateCommandInput} for command's `input` shape. + * @see {@link StartPrimaryEmailUpdateCommandOutput} for command's `response` shape. + * @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The operation failed because the calling identity doesn't have the minimum required + * permissions.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of a conflict in the current status of the + * resource. For example, this happens if you try to enable a Region that is currently being disabled + * (in a status of DISABLING).

+ * + * @throws {@link InternalServerException} (server fault) + *

The operation failed because of an error internal to Amazon Web Services. Try your operation again + * later.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The operation failed because it specified a resource that can't be found.

+ * + * @throws {@link TooManyRequestsException} (client fault) + *

The operation failed because it was called too frequently and exceeded a throttle + * limit.

+ * + * @throws {@link ValidationException} (client fault) + *

The operation failed because one of the input parameters was invalid.

+ * + * @throws {@link AccountServiceException} + *

Base exception class for all service exceptions from Account service.

+ * + * @public + */ +export class StartPrimaryEmailUpdateCommand extends $Command + .classBuilder< + StartPrimaryEmailUpdateCommandInput, + StartPrimaryEmailUpdateCommandOutput, + AccountClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: AccountClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("Account", "StartPrimaryEmailUpdate", {}) + .n("AccountClient", "StartPrimaryEmailUpdateCommand") + .f(StartPrimaryEmailUpdateRequestFilterSensitiveLog, void 0) + .ser(se_StartPrimaryEmailUpdateCommand) + .de(de_StartPrimaryEmailUpdateCommand) + .build() {} diff --git a/clients/client-account/src/commands/index.ts b/clients/client-account/src/commands/index.ts index cee45e165a392..fb15aa39ef2c1 100644 --- a/clients/client-account/src/commands/index.ts +++ b/clients/client-account/src/commands/index.ts @@ -1,10 +1,13 @@ // smithy-typescript generated code +export * from "./AcceptPrimaryEmailUpdateCommand"; export * from "./DeleteAlternateContactCommand"; export * from "./DisableRegionCommand"; export * from "./EnableRegionCommand"; export * from "./GetAlternateContactCommand"; export * from "./GetContactInformationCommand"; +export * from "./GetPrimaryEmailCommand"; export * from "./GetRegionOptStatusCommand"; export * from "./ListRegionsCommand"; export * from "./PutAlternateContactCommand"; export * from "./PutContactInformationCommand"; +export * from "./StartPrimaryEmailUpdateCommand"; diff --git a/clients/client-account/src/models/models_0.ts b/clients/client-account/src/models/models_0.ts index 72d4e22b58a9c..95ea08382c245 100644 --- a/clients/client-account/src/models/models_0.ts +++ b/clients/client-account/src/models/models_0.ts @@ -4,73 +4,110 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from " import { AccountServiceException as __BaseException } from "./AccountServiceException"; /** - *

The operation failed because the calling identity doesn't have the minimum required - * permissions.

* @public */ -export class AccessDeniedException extends __BaseException { - readonly name: "AccessDeniedException" = "AccessDeniedException"; - readonly $fault: "client" = "client"; +export interface AcceptPrimaryEmailUpdateRequest { /** - * @internal + *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access + * or modify with this operation. To use this parameter, the caller must be an identity in + * the organization's + * management account or a delegated administrator account. The specified + * account ID must be a member account in the same organization. The organization must have + * all features + * enabled, and the organization must have trusted access enabled + * for the Account Management service, and optionally a delegated admin account + * assigned.

+ *

This operation can only be called from the management account or the delegated + * administrator account of an organization for a member account.

+ * + *

The management account can't specify its own AccountId.

+ *
+ * @public */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "AccessDeniedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, AccessDeniedException.prototype); - } + AccountId: string | undefined; + + /** + *

The new primary email address for use with the specified account. This must + * match the PrimaryEmail from the StartPrimaryEmailUpdate API + * call.

+ * @public + */ + PrimaryEmail: string | undefined; + + /** + *

The OTP code sent to the PrimaryEmail specified on the + * StartPrimaryEmailUpdate API call.

+ * @public + */ + Otp: string | undefined; } /** * @public * @enum */ -export const AlternateContactType = { - BILLING: "BILLING", - OPERATIONS: "OPERATIONS", - SECURITY: "SECURITY", +export const PrimaryEmailUpdateStatus = { + ACCEPTED: "ACCEPTED", + PENDING: "PENDING", } as const; /** * @public */ -export type AlternateContactType = (typeof AlternateContactType)[keyof typeof AlternateContactType]; +export type PrimaryEmailUpdateStatus = (typeof PrimaryEmailUpdateStatus)[keyof typeof PrimaryEmailUpdateStatus]; /** * @public */ -export interface DeleteAlternateContactRequest { +export interface AcceptPrimaryEmailUpdateResponse { /** - *

Specifies which of the alternate contacts to delete.

+ *

Retrieves the status of the accepted primary email update request.

* @public */ - AlternateContactType: AlternateContactType | undefined; + Status?: PrimaryEmailUpdateStatus; +} +/** + *

The operation failed because the calling identity doesn't have the minimum required + * permissions.

+ * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; /** - *

Specifies the 12 digit account ID number of the Amazon Web Services account that - * you want to access or modify with this operation.

- *

If you do not specify this parameter, it defaults to the Amazon Web Services account of the - * identity used to call the operation.

- *

To use this parameter, the caller must be an identity in the organization's management account or a delegated administrator account, and - * the specified account ID must be a member account in the same organization. The - * organization must have all features - * enabled, and the organization must have trusted access enabled for the - * Account Management service, and optionally a delegated admin account - * assigned.

- * - *

The management account can't specify its own AccountId; it must call - * the operation in standalone context by not including the AccountId - * parameter.

- *
- *

To call this operation on an account that is not a member of an organization, then - * don't specify this parameter, and call the operation using an identity belonging to - * the account whose contacts you wish to retrieve or modify.

- * @public + * @internal */ - AccountId?: string; + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + } +} + +/** + *

The request could not be processed because of a conflict in the current status of the + * resource. For example, this happens if you try to enable a Region that is currently being disabled + * (in a status of DISABLING).

+ * @public + */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + } } /** @@ -205,6 +242,55 @@ export class ValidationException extends __BaseException { } } +/** + * @public + * @enum + */ +export const AlternateContactType = { + BILLING: "BILLING", + OPERATIONS: "OPERATIONS", + SECURITY: "SECURITY", +} as const; + +/** + * @public + */ +export type AlternateContactType = (typeof AlternateContactType)[keyof typeof AlternateContactType]; + +/** + * @public + */ +export interface DeleteAlternateContactRequest { + /** + *

Specifies which of the alternate contacts to delete.

+ * @public + */ + AlternateContactType: AlternateContactType | undefined; + + /** + *

Specifies the 12 digit account ID number of the Amazon Web Services account that + * you want to access or modify with this operation.

+ *

If you do not specify this parameter, it defaults to the Amazon Web Services account of the + * identity used to call the operation.

+ *

To use this parameter, the caller must be an identity in the organization's management account or a delegated administrator account, and + * the specified account ID must be a member account in the same organization. The + * organization must have all features + * enabled, and the organization must have trusted access enabled for the + * Account Management service, and optionally a delegated admin account + * assigned.

+ * + *

The management account can't specify its own AccountId; it must call + * the operation in standalone context by not including the AccountId + * parameter.

+ *
+ *

To call this operation on an account that is not a member of an organization, then + * don't specify this parameter, and call the operation using an identity belonging to + * the account whose contacts you wish to retrieve or modify.

+ * @public + */ + AccountId?: string; +} + /** * @public */ @@ -352,10 +438,10 @@ export interface GetContactInformationRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must have + * account ID must be a member account in the same organization. The organization must have * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account @@ -366,15 +452,16 @@ export interface GetContactInformationRequest { * parameter.

* *

To call this operation on an account that is not a member of an organization, don't - * specify this parameter. Instead, call the operation using an identity belonging to - * the account whose contacts you wish to retrieve or modify.

+ * specify this parameter. Instead, call the operation using an identity belonging to the + * account whose contacts you wish to retrieve or modify.

* @public */ AccountId?: string; } /** - *

Contains the details of the primary contact information associated with an Amazon Web Services account.

+ *

Contains the details of the primary contact information associated with an + * Amazon Web Services account.

* @public */ export interface ContactInformation { @@ -409,7 +496,11 @@ export interface ContactInformation { City: string | undefined; /** - *

The state or region of the primary contact address. This field is required in selected countries.

+ *

The state or region of the primary contact address. If the mailing address is within the United States (US), the + * value in this field can be either a two character state code (for example, NJ) or the full state name + * (for example, New Jersey). This field is required in the following countries: US, + * CA, GB, DE, JP, IN, + * and BR.

* @public */ StateOrRegion?: string; @@ -433,13 +524,15 @@ export interface ContactInformation { CountryCode: string | undefined; /** - *

The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.

+ *

The phone number of the primary contact information. The number will be validated and, + * in some countries, checked for activation.

* @public */ PhoneNumber: string | undefined; /** - *

The name of the company associated with the primary contact information, if any.

+ *

The name of the company associated with the primary contact information, if + * any.

* @public */ CompanyName?: string; @@ -456,7 +549,8 @@ export interface ContactInformation { */ export interface GetContactInformationResponse { /** - *

Contains the details of the primary contact information associated with an Amazon Web Services account.

+ *

Contains the details of the primary contact information associated with an + * Amazon Web Services account.

* @public */ ContactInformation?: ContactInformation; @@ -467,7 +561,8 @@ export interface GetContactInformationResponse { */ export interface PutContactInformationRequest { /** - *

Contains the details of the primary contact information associated with an Amazon Web Services account.

+ *

Contains the details of the primary contact information associated with an + * Amazon Web Services account.

* @public */ ContactInformation: ContactInformation | undefined; @@ -475,11 +570,11 @@ export interface PutContactInformationRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must have - * all features + * account ID must be a member account in the same organization. The organization must have + * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account * assigned.

@@ -489,33 +584,89 @@ export interface PutContactInformationRequest { * parameter.

* *

To call this operation on an account that is not a member of an organization, don't - * specify this parameter. Instead, call the operation using an identity belonging to - * the account whose contacts you wish to retrieve or modify.

+ * specify this parameter. Instead, call the operation using an identity belonging to the + * account whose contacts you wish to retrieve or modify.

* @public */ AccountId?: string; } /** - *

The request could not be processed because of a conflict in the current status of the - * resource. For example, this happens if you try to enable a Region that is currently being disabled - * (in a status of DISABLING).

* @public */ -export class ConflictException extends __BaseException { - readonly name: "ConflictException" = "ConflictException"; - readonly $fault: "client" = "client"; +export interface GetPrimaryEmailRequest { /** - * @internal + *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access + * or modify with this operation. To use this parameter, the caller must be an identity in + * the organization's + * management account or a delegated administrator account. The specified + * account ID must be a member account in the same organization. The organization must have + * all features + * enabled, and the organization must have trusted access enabled + * for the Account Management service, and optionally a delegated admin account + * assigned.

+ *

This operation can only be called from the management account or the delegated + * administrator account of an organization for a member account.

+ * + *

The management account can't specify its own AccountId.

+ *
+ * @public */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ConflictException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ConflictException.prototype); - } + AccountId: string | undefined; +} + +/** + * @public + */ +export interface GetPrimaryEmailResponse { + /** + *

Retrieves the primary email address associated with the specified + * account.

+ * @public + */ + PrimaryEmail?: string; +} + +/** + * @public + */ +export interface StartPrimaryEmailUpdateRequest { + /** + *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access + * or modify with this operation. To use this parameter, the caller must be an identity in + * the organization's + * management account or a delegated administrator account. The specified + * account ID must be a member account in the same organization. The organization must have + * all features + * enabled, and the organization must have trusted access enabled + * for the Account Management service, and optionally a delegated admin account + * assigned.

+ *

This operation can only be called from the management account or the delegated + * administrator account of an organization for a member account.

+ * + *

The management account can't specify its own AccountId.

+ *
+ * @public + */ + AccountId: string | undefined; + + /** + *

The new primary email address (also known as the root user email address) to + * use in the specified account.

+ * @public + */ + PrimaryEmail: string | undefined; +} + +/** + * @public + */ +export interface StartPrimaryEmailUpdateResponse { + /** + *

The status of the primary email update request.

+ * @public + */ + Status?: PrimaryEmailUpdateStatus; } /** @@ -525,11 +676,11 @@ export interface DisableRegionRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must - * have all features + * account ID must be a member account in the same organization. The organization must have + * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account * assigned.

@@ -546,11 +697,11 @@ export interface DisableRegionRequest { AccountId?: string; /** - *

Specifies the Region-code for a given Region name (for example, af-south-1). When - * you disable a Region, Amazon Web Services performs actions to deactivate that Region in your account, such - * as destroying IAM resources in the Region. This process takes a few minutes for most - * accounts, but this can take several hours. You cannot enable the Region until the - * disabling process is fully completed.

+ *

Specifies the Region-code for a given Region name (for example, + * af-south-1). When you disable a Region, Amazon Web Services performs actions to + * deactivate that Region in your account, such as destroying IAM resources in the Region. + * This process takes a few minutes for most accounts, but this can take several hours. You + * cannot enable the Region until the disabling process is fully completed.

* @public */ RegionName: string | undefined; @@ -563,11 +714,11 @@ export interface EnableRegionRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must - * have all features + * account ID must be a member account in the same organization. The organization must have + * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account * assigned.

@@ -584,12 +735,12 @@ export interface EnableRegionRequest { AccountId?: string; /** - *

Specifies the Region-code for a given Region name (for example, af-south-1). When - * you enable a Region, Amazon Web Services performs actions to prepare your account in that Region, such - * as distributing your IAM resources to the Region. This process takes a few minutes for - * most accounts, but it can take several hours. You cannot use the Region until this - * process is complete. Furthermore, you cannot disable the Region until the enabling - * process is fully completed.

+ *

Specifies the Region-code for a given Region name (for example, + * af-south-1). When you enable a Region, Amazon Web Services performs actions to + * prepare your account in that Region, such as distributing your IAM resources to the + * Region. This process takes a few minutes for most accounts, but it can take several + * hours. You cannot use the Region until this process is complete. Furthermore, you cannot + * disable the Region until the enabling process is fully completed.

* @public */ RegionName: string | undefined; @@ -602,11 +753,11 @@ export interface GetRegionOptStatusRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must - * have all features + * account ID must be a member account in the same organization. The organization must have + * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account * assigned.

@@ -623,8 +774,9 @@ export interface GetRegionOptStatusRequest { AccountId?: string; /** - *

Specifies the Region-code for a given Region name (for example, af-south-1). This - * function will return the status of whatever Region you pass into this parameter.

+ *

Specifies the Region-code for a given Region name (for example, + * af-south-1). This function will return the status of whatever Region + * you pass into this parameter.

* @public */ RegionName: string | undefined; @@ -672,11 +824,11 @@ export interface ListRegionsRequest { /** *

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access * or modify with this operation. If you don't specify this parameter, it defaults to the - * Amazon Web Services account of the identity used to call the operation. To use this parameter, the - * caller must be an identity in the organization's + * Amazon Web Services account of the identity used to call the operation. To use this + * parameter, the caller must be an identity in the organization's * management account or a delegated administrator account. The specified - * account ID must also be a member account in the same organization. The organization must - * have all features + * account ID must be a member account in the same organization. The organization must have + * all features * enabled, and the organization must have trusted access enabled * for the Account Management service, and optionally a delegated admin account * assigned.

@@ -735,8 +887,8 @@ export interface Region { RegionName?: string; /** - *

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, - * Enabled_By_Default).

+ *

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, + * Disabling, Enabled_By_Default).

* @public */ RegionOptStatus?: RegionOptStatus; @@ -762,6 +914,15 @@ export interface ListRegionsResponse { Regions?: Region[]; } +/** + * @internal + */ +export const AcceptPrimaryEmailUpdateRequestFilterSensitiveLog = (obj: AcceptPrimaryEmailUpdateRequest): any => ({ + ...obj, + ...(obj.PrimaryEmail && { PrimaryEmail: SENSITIVE_STRING }), + ...(obj.Otp && { Otp: SENSITIVE_STRING }), +}); + /** * @internal */ @@ -834,3 +995,19 @@ export const PutContactInformationRequestFilterSensitiveLog = (obj: PutContactIn ...obj, ...(obj.ContactInformation && { ContactInformation: ContactInformationFilterSensitiveLog(obj.ContactInformation) }), }); + +/** + * @internal + */ +export const GetPrimaryEmailResponseFilterSensitiveLog = (obj: GetPrimaryEmailResponse): any => ({ + ...obj, + ...(obj.PrimaryEmail && { PrimaryEmail: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const StartPrimaryEmailUpdateRequestFilterSensitiveLog = (obj: StartPrimaryEmailUpdateRequest): any => ({ + ...obj, + ...(obj.PrimaryEmail && { PrimaryEmail: SENSITIVE_STRING }), +}); diff --git a/clients/client-account/src/protocols/Aws_restJson1.ts b/clients/client-account/src/protocols/Aws_restJson1.ts index 1d51ed20f8615..a4cd57620874c 100644 --- a/clients/client-account/src/protocols/Aws_restJson1.ts +++ b/clients/client-account/src/protocols/Aws_restJson1.ts @@ -19,6 +19,10 @@ import { SerdeContext as __SerdeContext, } from "@smithy/types"; +import { + AcceptPrimaryEmailUpdateCommandInput, + AcceptPrimaryEmailUpdateCommandOutput, +} from "../commands/AcceptPrimaryEmailUpdateCommand"; import { DeleteAlternateContactCommandInput, DeleteAlternateContactCommandOutput, @@ -33,6 +37,7 @@ import { GetContactInformationCommandInput, GetContactInformationCommandOutput, } from "../commands/GetContactInformationCommand"; +import { GetPrimaryEmailCommandInput, GetPrimaryEmailCommandOutput } from "../commands/GetPrimaryEmailCommand"; import { GetRegionOptStatusCommandInput, GetRegionOptStatusCommandOutput } from "../commands/GetRegionOptStatusCommand"; import { ListRegionsCommandInput, ListRegionsCommandOutput } from "../commands/ListRegionsCommand"; import { @@ -43,6 +48,10 @@ import { PutContactInformationCommandInput, PutContactInformationCommandOutput, } from "../commands/PutContactInformationCommand"; +import { + StartPrimaryEmailUpdateCommandInput, + StartPrimaryEmailUpdateCommandOutput, +} from "../commands/StartPrimaryEmailUpdateCommand"; import { AccountServiceException as __BaseException } from "../models/AccountServiceException"; import { AccessDeniedException, @@ -55,6 +64,30 @@ import { ValidationException, } from "../models/models_0"; +/** + * serializeAws_restJson1AcceptPrimaryEmailUpdateCommand + */ +export const se_AcceptPrimaryEmailUpdateCommand = async ( + input: AcceptPrimaryEmailUpdateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/acceptPrimaryEmailUpdate"); + let body: any; + body = JSON.stringify( + take(input, { + AccountId: [], + Otp: [], + PrimaryEmail: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteAlternateContactCommand */ @@ -169,6 +202,28 @@ export const se_GetContactInformationCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetPrimaryEmailCommand + */ +export const se_GetPrimaryEmailCommand = async ( + input: GetPrimaryEmailCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/getPrimaryEmail"); + let body: any; + body = JSON.stringify( + take(input, { + AccountId: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetRegionOptStatusCommand */ @@ -267,6 +322,50 @@ export const se_PutContactInformationCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1StartPrimaryEmailUpdateCommand + */ +export const se_StartPrimaryEmailUpdateCommand = async ( + input: StartPrimaryEmailUpdateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/startPrimaryEmailUpdate"); + let body: any; + body = JSON.stringify( + take(input, { + AccountId: [], + PrimaryEmail: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * deserializeAws_restJson1AcceptPrimaryEmailUpdateCommand + */ +export const de_AcceptPrimaryEmailUpdateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1DeleteAlternateContactCommand */ @@ -360,6 +459,27 @@ export const de_GetContactInformationCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetPrimaryEmailCommand + */ +export const de_GetPrimaryEmailCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + PrimaryEmail: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetRegionOptStatusCommand */ @@ -438,6 +558,27 @@ export const de_PutContactInformationCommand = async ( return contents; }; +/** + * deserializeAws_restJson1StartPrimaryEmailUpdateCommand + */ +export const de_StartPrimaryEmailUpdateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserialize_Aws_restJson1CommandError */ @@ -451,6 +592,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "AccessDeniedException": case "com.amazonaws.account#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.account#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); case "InternalServerException": case "com.amazonaws.account#InternalServerException": throw await de_InternalServerExceptionRes(parsedOutput, context); @@ -463,9 +607,6 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ValidationException": case "com.amazonaws.account#ValidationException": throw await de_ValidationExceptionRes(parsedOutput, context); - case "ConflictException": - case "com.amazonaws.account#ConflictException": - throw await de_ConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ diff --git a/codegen/sdk-codegen/aws-models/account.json b/codegen/sdk-codegen/aws-models/account.json index 1770351e41345..bb6fd87bd94bc 100644 --- a/codegen/sdk-codegen/aws-models/account.json +++ b/codegen/sdk-codegen/aws-models/account.json @@ -1,6 +1,86 @@ { "smithy": "2.0", "shapes": { + "com.amazonaws.account#AcceptPrimaryEmailUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdateRequest" + }, + "output": { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#ConflictException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known\n as the root user email address) for the specified account.

", + "smithy.api#http": { + "uri": "/acceptPrimaryEmailUpdate", + "method": "POST", + "code": 200 + } + } + }, + "com.amazonaws.account#AcceptPrimaryEmailUpdateRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + }, + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

The new primary email address for use with the specified account. This must\n match the PrimaryEmail from the StartPrimaryEmailUpdate API\n call.

", + "smithy.api#required": {} + } + }, + "Otp": { + "target": "com.amazonaws.account#Otp", + "traits": { + "smithy.api#documentation": "

The OTP code sent to the PrimaryEmail specified on the\n StartPrimaryEmailUpdate API call.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#AcceptPrimaryEmailUpdateResponse": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.account#PrimaryEmailUpdateStatus", + "traits": { + "smithy.api#documentation": "

Retrieves the status of the accepted primary email update request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.account#AccessDeniedException": { "type": "structure", "members": { @@ -27,6 +107,9 @@ { "target": "com.amazonaws.account#ContactInformationResource" }, + { + "target": "com.amazonaws.account#PrimaryEmailResource" + }, { "target": "com.amazonaws.account#RegionOptResource" } @@ -1014,7 +1097,7 @@ "StateOrRegion": { "target": "com.amazonaws.account#StateOrRegion", "traits": { - "smithy.api#documentation": "

The state or region of the primary contact address. This field is required in selected countries.

" + "smithy.api#documentation": "

The state or region of the primary contact address. If the mailing address is within the United States (US), the\n value in this field can be either a two character state code (for example, NJ) or the full state name\n (for example, New Jersey). This field is required in the following countries: US,\n CA, GB, DE, JP, IN,\n and BR.

" } }, "DistrictOrCounty": { @@ -1040,14 +1123,14 @@ "PhoneNumber": { "target": "com.amazonaws.account#ContactInformationPhoneNumber", "traits": { - "smithy.api#documentation": "

The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.

", + "smithy.api#documentation": "

The phone number of the primary contact information. The number will be validated and,\n in some countries, checked for activation.

", "smithy.api#required": {} } }, "CompanyName": { "target": "com.amazonaws.account#CompanyName", "traits": { - "smithy.api#documentation": "

The name of the company associated with the primary contact information, if any.

" + "smithy.api#documentation": "

The name of the company associated with the primary contact information, if\n any.

" } }, "WebsiteUrl": { @@ -1058,7 +1141,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

" + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

" } }, "com.amazonaws.account#ContactInformationPhoneNumber": { @@ -1178,7 +1261,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disables (opts-out) a particular Region for an account.

", + "smithy.api#documentation": "

Disables (opts-out) a particular Region for an account.

\n \n

The act of disabling a Region will remove all IAM access to any resources that\n reside in that Region.

\n
", "smithy.api#http": { "uri": "/disableRegion", "method": "POST", @@ -1192,13 +1275,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). When\n you disable a Region, Amazon Web Services performs actions to deactivate that Region in your account, such\n as destroying IAM resources in the Region. This process takes a few minutes for most\n accounts, but this can take several hours. You cannot enable the Region until the\n disabling process is fully completed.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). When you disable a Region, Amazon Web Services performs actions to\n deactivate that Region in your account, such as destroying IAM resources in the Region.\n This process takes a few minutes for most accounts, but this can take several hours. You\n cannot enable the Region until the disabling process is fully completed.

", "smithy.api#required": {} } } @@ -1268,13 +1351,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). When\n you enable a Region, Amazon Web Services performs actions to prepare your account in that Region, such\n as distributing your IAM resources to the Region. This process takes a few minutes for\n most accounts, but it can take several hours. You cannot use the Region until this\n process is complete. Furthermore, you cannot disable the Region until the enabling\n process is fully completed.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). When you enable a Region, Amazon Web Services performs actions to\n prepare your account in that Region, such as distributing your IAM resources to the\n Region. This process takes a few minutes for most accounts, but it can take several\n hours. You cannot use the Region until this process is complete. Furthermore, you cannot\n disable the Region until the enabling process is fully completed.

", "smithy.api#required": {} } } @@ -1406,7 +1489,7 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to\n the account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } } }, @@ -1420,7 +1503,72 @@ "ContactInformation": { "target": "com.amazonaws.account#ContactInformation", "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

" + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.account#GetPrimaryEmail": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#GetPrimaryEmailRequest" + }, + "output": { + "target": "com.amazonaws.account#GetPrimaryEmailResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the primary email address for the specified account.

", + "smithy.api#http": { + "uri": "/getPrimaryEmail", + "method": "POST", + "code": 200 + }, + "smithy.api#readonly": {}, + "smithy.api#suppress": ["HttpMethodSemantics"] + } + }, + "com.amazonaws.account#GetPrimaryEmailRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#GetPrimaryEmailResponse": { + "type": "structure", + "members": { + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

Retrieves the primary email address associated with the specified\n account.

" } } }, @@ -1467,13 +1615,13 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "RegionName": { "target": "com.amazonaws.account#RegionName", "traits": { - "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example, af-south-1). This\n function will return the status of whatever Region you pass into this parameter.

", + "smithy.api#documentation": "

Specifies the Region-code for a given Region name (for example,\n af-south-1). This function will return the status of whatever Region\n you pass into this parameter.

", "smithy.api#required": {} } } @@ -1564,7 +1712,7 @@ "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must\n have all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } }, "MaxResults": { @@ -1627,6 +1775,13 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#Otp": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-zA-Z0-9]{6}$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.account#PhoneNumber": { "type": "string", "traits": { @@ -1648,6 +1803,50 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#PrimaryEmailAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.account#PrimaryEmailResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.account#AcceptPrimaryEmailUpdate" + }, + { + "target": "com.amazonaws.account#GetPrimaryEmail" + }, + { + "target": "com.amazonaws.account#StartPrimaryEmailUpdate" + } + ], + "traits": { + "aws.api#arn": { + "template": "PrimaryEmail" + } + } + }, + "com.amazonaws.account#PrimaryEmailUpdateStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "ACCEPTED", + "name": "ACCEPTED" + } + ] + } + }, "com.amazonaws.account#PutAlternateContact": { "type": "operation", "input": { @@ -1752,7 +1951,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the primary contact information of an Amazon Web Services account.

\n

For complete details about how to use the primary contact operations, see Update\n the primary and alternate contact information.

", + "smithy.api#documentation": "

Updates the primary contact information of an Amazon Web Services account.

\n

For complete details about how to use the primary contact operations, see Update\n the primary and alternate contact information.

", "smithy.api#http": { "uri": "/putContactInformation", "method": "POST", @@ -1767,14 +1966,14 @@ "ContactInformation": { "target": "com.amazonaws.account#ContactInformation", "traits": { - "smithy.api#documentation": "

Contains the details of the primary contact information associated with an Amazon Web Services account.

", + "smithy.api#documentation": "

Contains the details of the primary contact information associated with an\n Amazon Web Services account.

", "smithy.api#required": {} } }, "AccountId": { "target": "com.amazonaws.account#AccountId", "traits": { - "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this parameter, the\n caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must also be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to\n the account whose contacts you wish to retrieve or modify.

" + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. If you don't specify this parameter, it defaults to the\n Amazon Web Services account of the identity used to call the operation. To use this\n parameter, the caller must be an identity in the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n \n

The management account can't specify its own AccountId. It must call\n the operation in standalone context by not including the AccountId\n parameter.

\n
\n

To call this operation on an account that is not a member of an organization, don't\n specify this parameter. Instead, call the operation using an identity belonging to the\n account whose contacts you wish to retrieve or modify.

" } } }, @@ -1794,7 +1993,7 @@ "RegionOptStatus": { "target": "com.amazonaws.account#RegionOptStatus", "traits": { - "smithy.api#documentation": "

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling,\n Enabled_By_Default).

" + "smithy.api#documentation": "

One of potential statuses a Region can undergo (Enabled, Enabling, Disabled,\n Disabling, Enabled_By_Default).

" } } }, @@ -1894,6 +2093,79 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.account#StartPrimaryEmailUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.account#StartPrimaryEmailUpdateRequest" + }, + "output": { + "target": "com.amazonaws.account#StartPrimaryEmailUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.account#AccessDeniedException" + }, + { + "target": "com.amazonaws.account#ConflictException" + }, + { + "target": "com.amazonaws.account#InternalServerException" + }, + { + "target": "com.amazonaws.account#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.account#TooManyRequestsException" + }, + { + "target": "com.amazonaws.account#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts the process to update the primary email address for the specified\n account.

", + "smithy.api#http": { + "uri": "/startPrimaryEmailUpdate", + "method": "POST", + "code": 200 + } + } + }, + "com.amazonaws.account#StartPrimaryEmailUpdateRequest": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.account#AccountId", + "traits": { + "smithy.api#documentation": "

Specifies the 12-digit account ID number of the Amazon Web Services account that you want to access\n or modify with this operation. To use this parameter, the caller must be an identity in\n the organization's\n management account or a delegated administrator account. The specified\n account ID must be a member account in the same organization. The organization must have\n all features\n enabled, and the organization must have trusted access enabled\n for the Account Management service, and optionally a delegated admin account\n assigned.

\n

This operation can only be called from the management account or the delegated\n administrator account of an organization for a member account.

\n \n

The management account can't specify its own AccountId.

\n
", + "smithy.api#required": {} + } + }, + "PrimaryEmail": { + "target": "com.amazonaws.account#PrimaryEmailAddress", + "traits": { + "smithy.api#documentation": "

The new primary email address (also known as the root user email address) to\n use in the specified account.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.account#StartPrimaryEmailUpdateResponse": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.account#PrimaryEmailUpdateStatus", + "traits": { + "smithy.api#documentation": "

The status of the primary email update request.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.account#StateOrRegion": { "type": "string", "traits": {