diff --git a/clients/client-notificationscontacts/.gitignore b/clients/client-notificationscontacts/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-notificationscontacts/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-notificationscontacts/LICENSE b/clients/client-notificationscontacts/LICENSE new file mode 100644 index 000000000000..1349aa7c9923 --- /dev/null +++ b/clients/client-notificationscontacts/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-notificationscontacts/README.md b/clients/client-notificationscontacts/README.md new file mode 100644 index 000000000000..ee7101b9e656 --- /dev/null +++ b/clients/client-notificationscontacts/README.md @@ -0,0 +1,277 @@ + + +# @aws-sdk/client-notificationscontacts + +## Description + +AWS SDK for JavaScript NotificationsContacts Client for Node.js, Browser and React Native. + +
AWS User Notifications Contacts is a service that allows you to create and manage email contacts for AWS User Notifications. The AWS User Notifications Contacts API Reference provides descriptions, API request parameters, and the JSON response for all email contact related API actions.
+ +## Installing + +To install this package, simply type add or install @aws-sdk/client-notificationscontacts +using your favorite package manager: + +- `npm install @aws-sdk/client-notificationscontacts` +- `yarn add @aws-sdk/client-notificationscontacts` +- `pnpm add @aws-sdk/client-notificationscontacts` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `NotificationsContactsClient` and +the commands you need, for example `ListEmailContactsCommand`: + +```js +// ES5 example +const { NotificationsContactsClient, ListEmailContactsCommand } = require("@aws-sdk/client-notificationscontacts"); +``` + +```ts +// ES6+ example +import { NotificationsContactsClient, ListEmailContactsCommand } from "@aws-sdk/client-notificationscontacts"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new NotificationsContactsClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListEmailContactsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-notificationscontacts"; +const client = new AWS.NotificationsContacts({ region: "REGION" }); + +// async/await. +try { + const data = await client.listEmailContacts(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listEmailContacts(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listEmailContacts(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-notificationscontacts` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +AWS User Notifications Contacts is a service that allows you to create and manage email contacts for AWS User Notifications. The AWS User Notifications Contacts API Reference provides descriptions, API request parameters, and the JSON response for all email contact related API actions.
+ * @public + */ +export class NotificationsContacts extends NotificationsContactsClient implements NotificationsContacts {} +createAggregatedClient(commands, NotificationsContacts); diff --git a/clients/client-notificationscontacts/src/NotificationsContactsClient.ts b/clients/client-notificationscontacts/src/NotificationsContactsClient.ts new file mode 100644 index 000000000000..3e7b1a405406 --- /dev/null +++ b/clients/client-notificationscontacts/src/NotificationsContactsClient.ts @@ -0,0 +1,334 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { + DefaultIdentityProviderConfig, + getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpSigningPlugin, +} from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + defaultNotificationsContactsHttpAuthSchemeParametersProvider, + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, + resolveHttpAuthSchemeConfig, +} from "./auth/httpAuthSchemeProvider"; +import { + ActivateEmailContactCommandInput, + ActivateEmailContactCommandOutput, +} from "./commands/ActivateEmailContactCommand"; +import { CreateEmailContactCommandInput, CreateEmailContactCommandOutput } from "./commands/CreateEmailContactCommand"; +import { DeleteEmailContactCommandInput, DeleteEmailContactCommandOutput } from "./commands/DeleteEmailContactCommand"; +import { GetEmailContactCommandInput, GetEmailContactCommandOutput } from "./commands/GetEmailContactCommand"; +import { ListEmailContactsCommandInput, ListEmailContactsCommandOutput } from "./commands/ListEmailContactsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { SendActivationCodeCommandInput, SendActivationCodeCommandOutput } from "./commands/SendActivationCodeCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | ActivateEmailContactCommandInput + | CreateEmailContactCommandInput + | DeleteEmailContactCommandInput + | GetEmailContactCommandInput + | ListEmailContactsCommandInput + | ListTagsForResourceCommandInput + | SendActivationCodeCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | ActivateEmailContactCommandOutput + | CreateEmailContactCommandOutput + | DeleteEmailContactCommandOutput + | GetEmailContactCommandOutput + | ListEmailContactsCommandOutput + | ListTagsForResourceCommandOutput + | SendActivationCodeCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __ProviderAWS User Notifications Contacts is a service that allows you to create and manage email contacts for AWS User Notifications. The AWS User Notifications Contacts API Reference provides descriptions, API request parameters, and the JSON response for all email contact related API actions.
+ * @public + */ +export class NotificationsContactsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + NotificationsContactsClientResolvedConfig +> { + /** + * The resolved configuration of NotificationsContactsClient class. This is resolved and normalized from the {@link NotificationsContactsClientConfig | constructor configuration interface}. + */ + readonly config: NotificationsContactsClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfigActivates an email contact using an activation code. This code is in the activation email sent to the email address associated with this email contact.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, ActivateEmailContactCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, ActivateEmailContactCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // ActivateEmailContactRequest + * arn: "STRING_VALUE", // required + * code: "STRING_VALUE", // required + * }; + * const command = new ActivateEmailContactCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param ActivateEmailContactCommandInput - {@link ActivateEmailContactCommandInput} + * @returns {@link ActivateEmailContactCommandOutput} + * @see {@link ActivateEmailContactCommandInput} for command's `input` shape. + * @see {@link ActivateEmailContactCommandOutput} for command's `response` shape. + * @see {@link NotificationsContactsClientResolvedConfig | config} for NotificationsContactsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You do not have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *Updating or deleting a resource can cause an inconsistent state.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class ActivateEmailContactCommand extends $Command + .classBuilder< + ActivateEmailContactCommandInput, + ActivateEmailContactCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "ActivateEmailContact", {}) + .n("NotificationsContactsClient", "ActivateEmailContactCommand") + .f(ActivateEmailContactRequestFilterSensitiveLog, void 0) + .ser(se_ActivateEmailContactCommand) + .de(de_ActivateEmailContactCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ActivateEmailContactRequest; + output: {}; + }; + sdk: { + input: ActivateEmailContactCommandInput; + output: ActivateEmailContactCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/CreateEmailContactCommand.ts b/clients/client-notificationscontacts/src/commands/CreateEmailContactCommand.ts new file mode 100644 index 000000000000..ec88124e5c5f --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/CreateEmailContactCommand.ts @@ -0,0 +1,122 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { + CreateEmailContactRequest, + CreateEmailContactRequestFilterSensitiveLog, + CreateEmailContactResponse, +} from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_CreateEmailContactCommand, se_CreateEmailContactCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateEmailContactCommand}. + */ +export interface CreateEmailContactCommandInput extends CreateEmailContactRequest {} +/** + * @public + * + * The output of {@link CreateEmailContactCommand}. + */ +export interface CreateEmailContactCommandOutput extends CreateEmailContactResponse, __MetadataBearer {} + +/** + *Creates an email contact for the provided email address.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, CreateEmailContactCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, CreateEmailContactCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // CreateEmailContactRequest + * name: "STRING_VALUE", // required + * emailAddress: "STRING_VALUE", // required + * tags: { // TagMap + * "You do not have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *Updating or deleting a resource can cause an inconsistent state.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *Request would cause a service quota to be exceeded.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class CreateEmailContactCommand extends $Command + .classBuilder< + CreateEmailContactCommandInput, + CreateEmailContactCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "CreateEmailContact", {}) + .n("NotificationsContactsClient", "CreateEmailContactCommand") + .f(CreateEmailContactRequestFilterSensitiveLog, void 0) + .ser(se_CreateEmailContactCommand) + .de(de_CreateEmailContactCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateEmailContactRequest; + output: CreateEmailContactResponse; + }; + sdk: { + input: CreateEmailContactCommandInput; + output: CreateEmailContactCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/DeleteEmailContactCommand.ts b/clients/client-notificationscontacts/src/commands/DeleteEmailContactCommand.ts new file mode 100644 index 000000000000..56b5c5a1e972 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/DeleteEmailContactCommand.ts @@ -0,0 +1,115 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteEmailContactRequest, DeleteEmailContactResponse } from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_DeleteEmailContactCommand, se_DeleteEmailContactCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteEmailContactCommand}. + */ +export interface DeleteEmailContactCommandInput extends DeleteEmailContactRequest {} +/** + * @public + * + * The output of {@link DeleteEmailContactCommand}. + */ +export interface DeleteEmailContactCommandOutput extends DeleteEmailContactResponse, __MetadataBearer {} + +/** + *Deletes an email contact.
+ *Deleting an email contact removes it from all associated notification configurations.
+ *You do not have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *Updating or deleting a resource can cause an inconsistent state.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class DeleteEmailContactCommand extends $Command + .classBuilder< + DeleteEmailContactCommandInput, + DeleteEmailContactCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "DeleteEmailContact", {}) + .n("NotificationsContactsClient", "DeleteEmailContactCommand") + .f(void 0, void 0) + .ser(se_DeleteEmailContactCommand) + .de(de_DeleteEmailContactCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteEmailContactRequest; + output: {}; + }; + sdk: { + input: DeleteEmailContactCommandInput; + output: DeleteEmailContactCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/GetEmailContactCommand.ts b/clients/client-notificationscontacts/src/commands/GetEmailContactCommand.ts new file mode 100644 index 000000000000..deb0c3c55617 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/GetEmailContactCommand.ts @@ -0,0 +1,122 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { + GetEmailContactRequest, + GetEmailContactResponse, + GetEmailContactResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_GetEmailContactCommand, se_GetEmailContactCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetEmailContactCommand}. + */ +export interface GetEmailContactCommandInput extends GetEmailContactRequest {} +/** + * @public + * + * The output of {@link GetEmailContactCommand}. + */ +export interface GetEmailContactCommandOutput extends GetEmailContactResponse, __MetadataBearer {} + +/** + *Returns an email contact.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, GetEmailContactCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, GetEmailContactCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // GetEmailContactRequest + * arn: "STRING_VALUE", // required + * }; + * const command = new GetEmailContactCommand(input); + * const response = await client.send(command); + * // { // GetEmailContactResponse + * // emailContact: { // EmailContact + * // arn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // address: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // creationTime: new Date("TIMESTAMP"), // required + * // updateTime: new Date("TIMESTAMP"), // required + * // }, + * // }; + * + * ``` + * + * @param GetEmailContactCommandInput - {@link GetEmailContactCommandInput} + * @returns {@link GetEmailContactCommandOutput} + * @see {@link GetEmailContactCommandInput} for command's `input` shape. + * @see {@link GetEmailContactCommandOutput} for command's `response` shape. + * @see {@link NotificationsContactsClientResolvedConfig | config} for NotificationsContactsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class GetEmailContactCommand extends $Command + .classBuilder< + GetEmailContactCommandInput, + GetEmailContactCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "GetEmailContact", {}) + .n("NotificationsContactsClient", "GetEmailContactCommand") + .f(void 0, GetEmailContactResponseFilterSensitiveLog) + .ser(se_GetEmailContactCommand) + .de(de_GetEmailContactCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetEmailContactRequest; + output: GetEmailContactResponse; + }; + sdk: { + input: GetEmailContactCommandInput; + output: GetEmailContactCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/ListEmailContactsCommand.ts b/clients/client-notificationscontacts/src/commands/ListEmailContactsCommand.ts new file mode 100644 index 000000000000..45c8169eb434 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/ListEmailContactsCommand.ts @@ -0,0 +1,123 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { + ListEmailContactsRequest, + ListEmailContactsResponse, + ListEmailContactsResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_ListEmailContactsCommand, se_ListEmailContactsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListEmailContactsCommand}. + */ +export interface ListEmailContactsCommandInput extends ListEmailContactsRequest {} +/** + * @public + * + * The output of {@link ListEmailContactsCommand}. + */ +export interface ListEmailContactsCommandOutput extends ListEmailContactsResponse, __MetadataBearer {} + +/** + *Lists all email contacts created under the Account.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, ListEmailContactsCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, ListEmailContactsCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // ListEmailContactsRequest + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new ListEmailContactsCommand(input); + * const response = await client.send(command); + * // { // ListEmailContactsResponse + * // nextToken: "STRING_VALUE", + * // emailContacts: [ // EmailContacts // required + * // { // EmailContact + * // arn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // address: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // creationTime: new Date("TIMESTAMP"), // required + * // updateTime: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListEmailContactsCommandInput - {@link ListEmailContactsCommandInput} + * @returns {@link ListEmailContactsCommandOutput} + * @see {@link ListEmailContactsCommandInput} for command's `input` shape. + * @see {@link ListEmailContactsCommandOutput} for command's `response` shape. + * @see {@link NotificationsContactsClientResolvedConfig | config} for NotificationsContactsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class ListEmailContactsCommand extends $Command + .classBuilder< + ListEmailContactsCommandInput, + ListEmailContactsCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "ListEmailContacts", {}) + .n("NotificationsContactsClient", "ListEmailContactsCommand") + .f(void 0, ListEmailContactsResponseFilterSensitiveLog) + .ser(se_ListEmailContactsCommand) + .de(de_ListEmailContactsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListEmailContactsRequest; + output: ListEmailContactsResponse; + }; + sdk: { + input: ListEmailContactsCommandInput; + output: ListEmailContactsCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/ListTagsForResourceCommand.ts b/clients/client-notificationscontacts/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..6f55298ee9b0 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,113 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, ListTagsForResourceCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, ListTagsForResourceCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // ListTagsForResourceRequest + * arn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: { // TagMap + * // "You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class ListTagsForResourceCommand extends $Command + .classBuilder< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "ListTagsForResource", {}) + .n("NotificationsContactsClient", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTagsForResourceRequest; + output: ListTagsForResourceResponse; + }; + sdk: { + input: ListTagsForResourceCommandInput; + output: ListTagsForResourceCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/SendActivationCodeCommand.ts b/clients/client-notificationscontacts/src/commands/SendActivationCodeCommand.ts new file mode 100644 index 000000000000..07c16fd11391 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/SendActivationCodeCommand.ts @@ -0,0 +1,115 @@ +// 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 { commonParams } from "../endpoint/EndpointParameters"; +import { SendActivationCodeRequest, SendActivationCodeResponse } from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_SendActivationCodeCommand, se_SendActivationCodeCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link SendActivationCodeCommand}. + */ +export interface SendActivationCodeCommandInput extends SendActivationCodeRequest {} +/** + * @public + * + * The output of {@link SendActivationCodeCommand}. + */ +export interface SendActivationCodeCommandOutput extends SendActivationCodeResponse, __MetadataBearer {} + +/** + *Sends an activation email to the email address associated with the specified email contact.
+ *It might take a few minutes for the activation email to arrive. If it doesn't arrive, check in your spam folder or try sending another activation email.
+ *You do not have sufficient access to perform this action.
+ * + * @throws {@link ConflictException} (client fault) + *Updating or deleting a resource can cause an inconsistent state.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class SendActivationCodeCommand extends $Command + .classBuilder< + SendActivationCodeCommandInput, + SendActivationCodeCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "SendActivationCode", {}) + .n("NotificationsContactsClient", "SendActivationCodeCommand") + .f(void 0, void 0) + .ser(se_SendActivationCodeCommand) + .de(de_SendActivationCodeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: SendActivationCodeRequest; + output: {}; + }; + sdk: { + input: SendActivationCodeCommandInput; + output: SendActivationCodeCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/TagResourceCommand.ts b/clients/client-notificationscontacts/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..2be1b5d468db --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/TagResourceCommand.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 { commonParams } from "../endpoint/EndpointParameters"; +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, TagResourceCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, TagResourceCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // TagResourceRequest + * arn: "STRING_VALUE", // required + * tags: { // TagMap // required + * "You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class TagResourceCommand extends $Command + .classBuilder< + TagResourceCommandInput, + TagResourceCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "TagResource", {}) + .n("NotificationsContactsClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: TagResourceRequest; + output: {}; + }; + sdk: { + input: TagResourceCommandInput; + output: TagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/UntagResourceCommand.ts b/clients/client-notificationscontacts/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..cdc4835b2db1 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/UntagResourceCommand.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 { commonParams } from "../endpoint/EndpointParameters"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../NotificationsContactsClient"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts..
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NotificationsContactsClient, UntagResourceCommand } from "@aws-sdk/client-notificationscontacts"; // ES Modules import + * // const { NotificationsContactsClient, UntagResourceCommand } = require("@aws-sdk/client-notificationscontacts"); // CommonJS import + * const client = new NotificationsContactsClient(config); + * const input = { // UntagResourceRequest + * arn: "STRING_VALUE", // required + * tagKeys: [ // TagKeys // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link NotificationsContactsClientResolvedConfig | config} for NotificationsContactsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerException} (server fault) + *Unexpected error during processing of request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Your request references a resource which does not exist.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link ValidationException} (client fault) + *The input fails to satisfy the constraints specified by an AWS service.
+ * + * @throws {@link NotificationsContactsServiceException} + *Base exception class for all service exceptions from NotificationsContacts service.
+ * + * @public + */ +export class UntagResourceCommand extends $Command + .classBuilder< + UntagResourceCommandInput, + UntagResourceCommandOutput, + NotificationsContactsClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: NotificationsContactsClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("NotificationsContacts", "UntagResource", {}) + .n("NotificationsContactsClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UntagResourceRequest; + output: {}; + }; + sdk: { + input: UntagResourceCommandInput; + output: UntagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-notificationscontacts/src/commands/index.ts b/clients/client-notificationscontacts/src/commands/index.ts new file mode 100644 index 000000000000..9f1ec6f9b446 --- /dev/null +++ b/clients/client-notificationscontacts/src/commands/index.ts @@ -0,0 +1,10 @@ +// smithy-typescript generated code +export * from "./ActivateEmailContactCommand"; +export * from "./CreateEmailContactCommand"; +export * from "./DeleteEmailContactCommand"; +export * from "./GetEmailContactCommand"; +export * from "./ListEmailContactsCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./SendActivationCodeCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; diff --git a/clients/client-notificationscontacts/src/endpoint/EndpointParameters.ts b/clients/client-notificationscontacts/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..c00238692aa2 --- /dev/null +++ b/clients/client-notificationscontacts/src/endpoint/EndpointParameters.ts @@ -0,0 +1,37 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + useFipsEndpoint?: boolean | ProviderAWS User Notifications Contacts is a service that allows you to create and manage email contacts for AWS User Notifications. The AWS User Notifications Contacts API Reference provides descriptions, API request parameters, and the JSON response for all email contact related API actions.
+ * + * @packageDocumentation + */ +export * from "./NotificationsContactsClient"; +export * from "./NotificationsContacts"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { NotificationsContactsExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +export { NotificationsContactsServiceException } from "./models/NotificationsContactsServiceException"; diff --git a/clients/client-notificationscontacts/src/models/NotificationsContactsServiceException.ts b/clients/client-notificationscontacts/src/models/NotificationsContactsServiceException.ts new file mode 100644 index 000000000000..0ff3f3437c1b --- /dev/null +++ b/clients/client-notificationscontacts/src/models/NotificationsContactsServiceException.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; + +/** + * @public + * + * Base exception class for all service exceptions from NotificationsContacts service. + */ +export class NotificationsContactsServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, NotificationsContactsServiceException.prototype); + } +} diff --git a/clients/client-notificationscontacts/src/models/index.ts b/clients/client-notificationscontacts/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-notificationscontacts/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-notificationscontacts/src/models/models_0.ts b/clients/client-notificationscontacts/src/models/models_0.ts new file mode 100644 index 000000000000..abcbd499fae6 --- /dev/null +++ b/clients/client-notificationscontacts/src/models/models_0.ts @@ -0,0 +1,582 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { NotificationsContactsServiceException as __BaseException } from "./NotificationsContactsServiceException"; + +/** + *You do not have sufficient access to perform this action.
+ * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe Amazon Resource Name (ARN) of the resource.
+ * @public + */ + arn: string | undefined; + + /** + *The activation code for this email contact.
+ *An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the SendActivationCode API action.
+ * @public + */ + code: string | undefined; +} + +/** + * @public + */ +export interface ActivateEmailContactResponse {} + +/** + *Updating or deleting a resource can cause an inconsistent state.
+ * @public + */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + *The resource ID that prompted the conflict error.
+ * @public + */ + resourceId: string | undefined; + + /** + *The resource type that prompted the conflict error.
+ * @public + */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeUnexpected error during processing of request.
+ * @public + */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + $retryable = {}; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeYour request references a resource which does not exist.
+ * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + *The ID of the resource that wasn't found.
+ * @public + */ + resourceId: string | undefined; + + /** + *The type of resource that wasn't found.
+ * @public + */ + resourceType: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe request was denied due to request throttling.
+ * @public + */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = { + throttling: true, + }; + /** + *Identifies the service being throttled.
+ * @public + */ + serviceCode?: string | undefined; + + /** + *Identifies the quota that is being throttled.
+ * @public + */ + quotaCode?: string | undefined; + + /** + *The number of seconds a client should wait before retrying the request.
+ * @public + */ + retryAfterSeconds?: number | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeStores information about a field passed inside a request that resulted in an exception.
+ * @public + */ +export interface ValidationExceptionField { + /** + *The field name where the invalid entry was detected.
+ * @public + */ + name: string | undefined; + + /** + *A message with the reason for the validation exception error.
+ * @public + */ + message: string | undefined; +} + +/** + * @public + * @enum + */ +export const ValidationExceptionReason = { + FIELD_VALIDATION_FAILED: "fieldValidationFailed", + OTHER: "other", +} as const; + +/** + * @public + */ +export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason]; + +/** + *The input fails to satisfy the constraints specified by an AWS service.
+ * @public + */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + *The reason why your input is considered invalid.
+ * @public + */ + reason: ValidationExceptionReason | undefined; + + /** + *The list of input fields that are invalid.
+ * @public + */ + fieldList?: ValidationExceptionField[] | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe name of the email contact.
+ * @public + */ + name: string | undefined; + + /** + *The email address this email contact points to. The activation email and any subscribed emails are sent here.
+ *This email address can't receive emails until it's activated.
+ *A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
+ * @public + */ + tags?: RecordThe Amazon Resource Name (ARN) of the resource.
+ * @public + */ + arn: string | undefined; +} + +/** + *Request would cause a service quota to be exceeded.
+ * @public + */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + *The ID of the resource that exceeds the service quota.
+ * @public + */ + resourceId: string | undefined; + + /** + *The type of the resource that exceeds the service quota.
+ * @public + */ + resourceType: string | undefined; + + /** + *The code for the service quota exceeded in Service Quotas.
+ * @public + */ + serviceCode: string | undefined; + + /** + *The code for the service quota in Service Quotas.
+ * @public + */ + quotaCode: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe Amazon Resource Name (ARN) of the resource.
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + */ +export interface DeleteEmailContactResponse {} + +/** + * @public + * @enum + */ +export const EmailContactStatus = { + ACTIVE: "active", + INACTIVE: "inactive", +} as const; + +/** + * @public + */ +export type EmailContactStatus = (typeof EmailContactStatus)[keyof typeof EmailContactStatus]; + +/** + *An email contact.
+ * @public + */ +export interface EmailContact { + /** + *The Amazon Resource Name (ARN) of the email contact.
+ * @public + */ + arn: string | undefined; + + /** + *The name of the email contact.
+ * @public + */ + name: string | undefined; + + /** + *The email address this email contact points to. The activation email and any subscribed emails are sent here.
+ * @public + */ + address: string | undefined; + + /** + *The status of the email contact. Only activated email contacts receive emails.
+ * @public + */ + status: EmailContactStatus | undefined; + + /** + *The creation time of the resource.
+ * @public + */ + creationTime: Date | undefined; + + /** + *The time the resource was last updated.
+ * @public + */ + updateTime: Date | undefined; +} + +/** + * @public + */ +export interface GetEmailContactRequest { + /** + *The Amazon Resource Name (ARN) of the email contact to get.
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + */ +export interface GetEmailContactResponse { + /** + *The email contact for the provided email address.
+ * @public + */ + emailContact: EmailContact | undefined; +} + +/** + * @public + */ +export interface ListEmailContactsRequest { + /** + *The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
+ * @public + */ + maxResults?: number | undefined; + + /** + *An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
+ * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + */ +export interface ListEmailContactsResponse { + /** + *An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
+ * @public + */ + nextToken?: string | undefined; + + /** + *A list of email contacts.
+ * @public + */ + emailContacts: EmailContact[] | undefined; +} + +/** + * @public + */ +export interface SendActivationCodeRequest { + /** + *The Amazon Resource Name (ARN) of the resource.
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + */ +export interface SendActivationCodeResponse {} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + *The ARN you specified to list the tags of.
+ * @public + */ + arn: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + *Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define.
+ * @public + */ + tags?: RecordThe ARN of the configuration.
+ * @public + */ + arn: string | undefined; + + /** + *A list of tags to apply to the configuration.
+ * @public + */ + tags: RecordThe value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.
+ * @public + */ + arn: string | undefined; + + /** + *Specifies a list of tag keys that you want to remove from the specified resources.
+ * @public + */ + tagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @internal + */ +export const ActivateEmailContactRequestFilterSensitiveLog = (obj: ActivateEmailContactRequest): any => ({ + ...obj, + ...(obj.code && { code: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateEmailContactRequestFilterSensitiveLog = (obj: CreateEmailContactRequest): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const EmailContactFilterSensitiveLog = (obj: EmailContact): any => ({ + ...obj, + ...(obj.name && { name: SENSITIVE_STRING }), + ...(obj.address && { address: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GetEmailContactResponseFilterSensitiveLog = (obj: GetEmailContactResponse): any => ({ + ...obj, + ...(obj.emailContact && { emailContact: EmailContactFilterSensitiveLog(obj.emailContact) }), +}); + +/** + * @internal + */ +export const ListEmailContactsResponseFilterSensitiveLog = (obj: ListEmailContactsResponse): any => ({ + ...obj, + ...(obj.emailContacts && { emailContacts: obj.emailContacts.map((item) => EmailContactFilterSensitiveLog(item)) }), +}); diff --git a/clients/client-notificationscontacts/src/pagination/Interfaces.ts b/clients/client-notificationscontacts/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..77f059fb7f93 --- /dev/null +++ b/clients/client-notificationscontacts/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { NotificationsContactsClient } from "../NotificationsContactsClient"; + +/** + * @public + */ +export interface NotificationsContactsPaginationConfiguration extends PaginationConfiguration { + client: NotificationsContactsClient; +} diff --git a/clients/client-notificationscontacts/src/pagination/ListEmailContactsPaginator.ts b/clients/client-notificationscontacts/src/pagination/ListEmailContactsPaginator.ts new file mode 100644 index 000000000000..4224e33fe901 --- /dev/null +++ b/clients/client-notificationscontacts/src/pagination/ListEmailContactsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListEmailContactsCommand, + ListEmailContactsCommandInput, + ListEmailContactsCommandOutput, +} from "../commands/ListEmailContactsCommand"; +import { NotificationsContactsClient } from "../NotificationsContactsClient"; +import { NotificationsContactsPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListEmailContacts: ( + config: NotificationsContactsPaginationConfiguration, + input: ListEmailContactsCommandInput, + ...rest: any[] +) => PaginatorYou do not have sufficient access to perform this action.
", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.notificationscontacts#ActivateEmailContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#ActivateEmailContactRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#ActivateEmailContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#ConflictException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to activate the email contact associated with the given ARN if the provided code is valid" + }, + "smithy.api#documentation": "Activates an email contact using an activation code. This code is in the activation email sent to the email address associated with this email contact.
", + "smithy.api#http": { + "code": 200, + "method": "PUT", + "uri": "/emailcontacts/{arn}/activate/{code}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.notificationscontacts#ActivateEmailContactRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "code": { + "target": "com.amazonaws.notificationscontacts#Token", + "traits": { + "smithy.api#documentation": "The activation code for this email contact.
\nAn email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the SendActivationCode API action.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#ActivateEmailContactResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.notificationscontacts#ResourceId", + "traits": { + "smithy.api#documentation": "The resource ID that prompted the conflict error.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.notificationscontacts#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type that prompted the conflict error.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Updating or deleting a resource can cause an inconsistent state.
", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.notificationscontacts#CreateEmailContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#CreateEmailContactRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#CreateEmailContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#ConflictException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to create an email contact" + }, + "smithy.api#documentation": "Creates an email contact for the provided email address.
", + "smithy.api#http": { + "code": 201, + "method": "POST", + "uri": "/2022-09-19/emailcontacts" + } + } + }, + "com.amazonaws.notificationscontacts#CreateEmailContactRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.notificationscontacts#EmailContactName", + "traits": { + "smithy.api#documentation": "The name of the email contact.
", + "smithy.api#required": {} + } + }, + "emailAddress": { + "target": "com.amazonaws.notificationscontacts#EmailContactAddress", + "traits": { + "smithy.api#documentation": "The email address this email contact points to. The activation email and any subscribed emails are sent here.
\nThis email address can't receive emails until it's activated.
\nA map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#CreateEmailContactResponse": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#CreationTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.notificationscontacts#DeleteEmailContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#DeleteEmailContactRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#DeleteEmailContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#ConflictException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to delete an email contact associated with the given ARN" + }, + "smithy.api#documentation": "Deletes an email contact.
\nDeleting an email contact removes it from all associated notification configurations.
\nThe Amazon Resource Name (ARN) of the resource.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#DeleteEmailContactResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#EmailContact": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the email contact.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.notificationscontacts#EmailContactName", + "traits": { + "smithy.api#documentation": "The name of the email contact.
", + "smithy.api#required": {} + } + }, + "address": { + "target": "com.amazonaws.notificationscontacts#SensitiveEmailContactAddress", + "traits": { + "smithy.api#documentation": "The email address this email contact points to. The activation email and any subscribed emails are sent here.
", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.notificationscontacts#EmailContactStatus", + "traits": { + "smithy.api#documentation": "The status of the email contact. Only activated email contacts receive emails.
", + "smithy.api#required": {} + } + }, + "creationTime": { + "target": "com.amazonaws.notificationscontacts#CreationTime", + "traits": { + "smithy.api#documentation": "The creation time of the resource.
", + "smithy.api#required": {} + } + }, + "updateTime": { + "target": "com.amazonaws.notificationscontacts#UpdateTime", + "traits": { + "smithy.api#documentation": "The time the resource was last updated.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An email contact.
" + } + }, + "com.amazonaws.notificationscontacts#EmailContactAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 6, + "max": 254 + }, + "smithy.api#pattern": "^(.+)@(.+)$" + } + }, + "com.amazonaws.notificationscontacts#EmailContactArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "service": "com.amazonaws.notificationscontacts#NotificationsContacts", + "resource": "com.amazon.aws.services.notifications.contacts.orchestration.service#EmailContact" + }, + "smithy.api#pattern": "^arn:aws:notifications-contacts::[0-9]{12}:emailcontact/[a-z0-9]{27}$" + } + }, + "com.amazonaws.notificationscontacts#EmailContactName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "[\\w-.~]+", + "smithy.api#sensitive": {}, + "smithy.api#suppress": ["PatternTrait"] + } + }, + "com.amazonaws.notificationscontacts#EmailContactResource": { + "type": "resource", + "identifiers": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn" + } + }, + "create": { + "target": "com.amazonaws.notificationscontacts#CreateEmailContact" + }, + "read": { + "target": "com.amazonaws.notificationscontacts#GetEmailContact" + }, + "delete": { + "target": "com.amazonaws.notificationscontacts#DeleteEmailContact" + }, + "list": { + "target": "com.amazonaws.notificationscontacts#ListEmailContacts" + }, + "operations": [ + { + "target": "com.amazonaws.notificationscontacts#ActivateEmailContact" + }, + { + "target": "com.amazonaws.notificationscontacts#SendActivationCode" + } + ], + "traits": { + "aws.api#arn": { + "template": "{arn}", + "absolute": true, + "noRegion": true + }, + "aws.cloudformation#cfnResource": {} + } + }, + "com.amazonaws.notificationscontacts#EmailContactStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "inactive", + "name": "INACTIVE" + }, + { + "value": "active", + "name": "ACTIVE" + } + ] + } + }, + "com.amazonaws.notificationscontacts#EmailContacts": { + "type": "list", + "member": { + "target": "com.amazonaws.notificationscontacts#EmailContact" + } + }, + "com.amazonaws.notificationscontacts#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.notificationscontacts#GetEmailContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#GetEmailContactRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#GetEmailContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to get an email contact associated with the given ARN" + }, + "smithy.api#documentation": "Returns an email contact.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/emailcontacts/{arn}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.notificationscontacts#GetEmailContactRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the email contact to get.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#GetEmailContactResponse": { + "type": "structure", + "members": { + "emailContact": { + "target": "com.amazonaws.notificationscontacts#EmailContact", + "traits": { + "smithy.api#documentation": "The email contact for the provided email address.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Unexpected error during processing of request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.notificationscontacts#ListEmailContacts": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#ListEmailContactsRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#ListEmailContactsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to list email contacts" + }, + "smithy.api#documentation": "Lists all email contacts created under the Account.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/emailcontacts" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "emailContacts" + }, + "smithy.api#readonly": {}, + "smithy.test#smokeTests": [ + { + "id": "ListEmailContactsSuccess", + "params": { + "maxResults": 1 + }, + "expect": { + "success": {} + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "vendorParams": { + "region": "us-east-1" + } + } + ] + } + }, + "com.amazonaws.notificationscontacts#ListEmailContactsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
", + "smithy.api#httpQuery": "maxResults", + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#ListEmailContactsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
" + } + }, + "emailContacts": { + "target": "com.amazonaws.notificationscontacts#EmailContacts", + "traits": { + "smithy.api#documentation": "A list of email contacts.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to get tags for a resource" + }, + "smithy.api#documentation": "Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.
", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{arn}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.notificationscontacts#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The ARN you specified to list the tags of.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.notificationscontacts#TagMap", + "traits": { + "smithy.api#documentation": "Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#NotificationsContacts": { + "type": "service", + "version": "2018-05-10", + "operations": [ + { + "target": "com.amazonaws.notificationscontacts#ListTagsForResource" + }, + { + "target": "com.amazonaws.notificationscontacts#TagResource" + }, + { + "target": "com.amazonaws.notificationscontacts#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.notificationscontacts#EmailContactResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "NotificationsContacts", + "arnNamespace": "notifications-contacts", + "endpointPrefix": "notifications-contacts", + "cloudTrailEventSource": "notifications-contacts.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "notifications-contacts" + }, + "aws.endpoints#dualStackOnlyEndpoints": {}, + "aws.endpoints#standardPartitionalEndpoints": { + "endpointPatternType": "service_region_dnsSuffix" + }, + "aws.iam#supportedPrincipalTypes": ["Root", "IAMUser", "IAMRole", "FederatedUser"], + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "*", + "content-type", + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" + ], + "additionalExposedHeaders": ["x-amzn-errortype", "x-amzn-requestid", "x-amzn-trace-id"], + "maxAge": 86400 + }, + "smithy.api#documentation": "AWS User Notifications Contacts is a service that allows you to create and manage email contacts for AWS User Notifications. The AWS User Notifications Contacts API Reference provides descriptions, API request parameters, and the JSON response for all email contact related API actions.
", + "smithy.api#title": "AWS User Notifications Contacts", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + }, + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "endpoint": { + "url": "https://notifications-contacts-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "{PartitionResult#implicitGlobalRegion}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://notifications-contacts.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "{PartitionResult#implicitGlobalRegion}" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For custom endpoint with region not set and fips disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": false + } + }, + { + "documentation": "For custom endpoint with fips enabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Endpoint": "https://example.com", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://notifications-contacts-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://notifications-contacts.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://notifications-contacts-fips.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": true + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "cn-northwest-1" + } + ] + }, + "url": "https://notifications-contacts.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://notifications-contacts-fips.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://notifications-contacts.us-gov-west-1.api.aws" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://notifications-contacts-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-iso-east-1" + } + ] + }, + "url": "https://notifications-contacts.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://notifications-contacts-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isob-east-1" + } + ] + }, + "url": "https://notifications-contacts.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "url": "https://notifications-contacts-fips.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": true + } + }, + { + "documentation": "For region eu-isoe-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "url": "https://notifications-contacts.eu-isoe-west-1.cloud.adc-e.uk" + } + }, + "params": { + "Region": "eu-isoe-west-1", + "UseFIPS": false + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://notifications-contacts-fips.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": true + } + }, + { + "documentation": "For region us-isof-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingRegion": "us-isof-south-1" + } + ] + }, + "url": "https://notifications-contacts.us-isof-south-1.csp.hci.ic.gov" + } + }, + "params": { + "Region": "us-isof-south-1", + "UseFIPS": false + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.notificationscontacts#QuotaCode": { + "type": "string" + }, + "com.amazonaws.notificationscontacts#ResourceId": { + "type": "string" + }, + "com.amazonaws.notificationscontacts#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.notificationscontacts#ResourceId", + "traits": { + "smithy.api#documentation": "The ID of the resource that wasn't found.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.notificationscontacts#ResourceType", + "traits": { + "smithy.api#documentation": "The type of resource that wasn't found.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Your request references a resource which does not exist.
", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.notificationscontacts#ResourceType": { + "type": "string" + }, + "com.amazonaws.notificationscontacts#SendActivationCode": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#SendActivationCodeRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#SendActivationCodeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#ConflictException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to send an activation link to the email associated with the given ARN" + }, + "smithy.api#documentation": "Sends an activation email to the email address associated with the specified email contact.
\nIt might take a few minutes for the activation email to arrive. If it doesn't arrive, check in your spam folder or try sending another activation email.
\nThe Amazon Resource Name (ARN) of the resource.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#SendActivationCodeResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#SensitiveEmailContactAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 6, + "max": 254 + }, + "smithy.api#pattern": "^(.+)@(.+)$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.notificationscontacts#ServiceCode": { + "type": "string" + }, + "com.amazonaws.notificationscontacts#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceId": { + "target": "com.amazonaws.notificationscontacts#ResourceId", + "traits": { + "smithy.api#documentation": "The ID of the resource that exceeds the service quota.
", + "smithy.api#required": {} + } + }, + "resourceType": { + "target": "com.amazonaws.notificationscontacts#ResourceType", + "traits": { + "smithy.api#documentation": "The type of the resource that exceeds the service quota.
", + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "com.amazonaws.notificationscontacts#ServiceCode", + "traits": { + "smithy.api#documentation": "The code for the service quota exceeded in Service Quotas.
", + "smithy.api#required": {} + } + }, + "quotaCode": { + "target": "com.amazonaws.notificationscontacts#QuotaCode", + "traits": { + "smithy.api#documentation": "The code for the service quota in Service Quotas.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request would cause a service quota to be exceeded.
", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.notificationscontacts#TagKey": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(?!aws:).{1,128}$" + } + }, + "com.amazonaws.notificationscontacts#TagKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.notificationscontacts#TagKey" + } + }, + "com.amazonaws.notificationscontacts#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.notificationscontacts#TagKey" + }, + "value": { + "target": "com.amazonaws.notificationscontacts#TagValue" + }, + "traits": { + "smithy.api#documentation": "Map of tags assigned to a resource", + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.notificationscontacts#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to tag a resource" + }, + "smithy.api#documentation": "Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts.
", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{arn}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.notificationscontacts#TagResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The ARN of the configuration.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.notificationscontacts#TagMap", + "traits": { + "smithy.api#documentation": "A list of tags to apply to the configuration.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.notificationscontacts#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "com.amazonaws.notificationscontacts#ServiceCode", + "traits": { + "smithy.api#documentation": "Identifies the service being throttled.
" + } + }, + "quotaCode": { + "target": "com.amazonaws.notificationscontacts#QuotaCode", + "traits": { + "smithy.api#documentation": "Identifies the quota that is being throttled.
" + } + }, + "retryAfterSeconds": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of seconds a client should wait before retrying the request.
", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "The request was denied due to request throttling.
", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": { + "throttling": true + } + } + }, + "com.amazonaws.notificationscontacts#Token": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 7, + "max": 7 + }, + "smithy.api#pattern": "^[a-z0-9]{7}$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.notificationscontacts#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.notificationscontacts#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.notificationscontacts#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.notificationscontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.notificationscontacts#InternalServerException" + }, + { + "target": "com.amazonaws.notificationscontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.notificationscontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.notificationscontacts#ValidationException" + } + ], + "traits": { + "aws.api#controlPlane": {}, + "aws.iam#iamAction": { + "documentation": "Grants permission to remove tags from a resource" + }, + "smithy.api#documentation": "Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts..
", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{arn}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.notificationscontacts#UntagResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.notificationscontacts#EmailContactArn", + "traits": { + "smithy.api#documentation": "The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.notificationscontacts#TagKeys", + "traits": { + "smithy.api#documentation": "Specifies a list of tag keys that you want to remove from the specified resources.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.notificationscontacts#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.notificationscontacts#UpdateTime": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.notificationscontacts#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.notificationscontacts#ErrorMessage", + "traits": { + "smithy.api#required": {} + } + }, + "reason": { + "target": "com.amazonaws.notificationscontacts#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "The reason why your input is considered invalid.
", + "smithy.api#required": {} + } + }, + "fieldList": { + "target": "com.amazonaws.notificationscontacts#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "The list of input fields that are invalid.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The input fails to satisfy the constraints specified by an AWS service.
", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.notificationscontacts#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The field name where the invalid entry was detected.
", + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A message with the reason for the validation exception error.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Stores information about a field passed inside a request that resulted in an exception.
" + } + }, + "com.amazonaws.notificationscontacts#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.notificationscontacts#ValidationExceptionField" + } + }, + "com.amazonaws.notificationscontacts#ValidationExceptionReason": { + "type": "enum", + "members": { + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fieldValidationFailed" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + } + } + } +}